make - Patches: patch #2903, great speed up for...
You are not allowed to post comments on this tracker with your current authentication level.
patch #2903: great speed up for "substitution references"
Submitter: | None | ||
Submitted: | Mon 05 Apr 2004 03:33:08 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Invalid | Privacy: | Public |
Assigned to: | None | Originator Email: | -email is unavailable- |
Open/Closed: | Closed | Fixed Release: | None |
Jump to the original submission
Tue 21 Sep 2004 06:03:43 AM UTC, comment #8: |
Paul D. Smith <psmith> |
Thu 29 Apr 2004 09:00:10 AM UTC, comment #7: Sorry, so what about this patch below?..
|
Anonymous |
Wed 14 Apr 2004 04:21:54 PM UTC, comment #6: Hm, all indents are removed, but it is OK for emacs users :)
|
Anonymous |
Wed 14 Apr 2004 04:18:03 PM UTC, comment #5: below goes the version of sindex that seems to correspond to original version of sindex, but with much better speed. I've updated the comment as well, because it was not reflecting the case of null values for blen and slen.
|
Anonymous |
Mon 12 Apr 2004 04:50:17 PM UTC, comment #4: Right, sorry, I meant strstr(). Regardless of this typo, my point stands: you cannot replace sindex() with strstr() because they are not functionally equivalent. sindex() gives a maximum length of the string to be checked, while strstr() does not (it always matches against the entire string). This means you will get incorrect results in some situations.
|
Paul D. Smith <psmith> |
Mon 05 Apr 2004 06:55:48 PM UTC, comment #3: there are not that much occurances of sindex:
|
Anonymous |
Mon 05 Apr 2004 06:35:41 PM UTC, comment #2: not strchr, but strstr... |
Anonymous |
Mon 05 Apr 2004 04:53:56 PM UTC, comment #1: It is not correct to replace sindex() with strchr(). The sindex() function works on substrings as well as full strings, and this capability is used extensively in GNU make. |
Paul D. Smith <psmith> |
Mon 05 Apr 2004 03:33:08 PM UTC, original submission:
This short test shows inadequate slow performance of string replacement:
|
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2004-09-21 | psmith | Status | None | Invalid | |
Open/Closed | Open | Closed | |||
2004-04-05 | None | Attached File | - | Added patch.txt, #3058 |
Powered by Savane 3.13-aa77.
Corresponding source code
I reworked the code to use strstr() everywhere that sindex() was used before, and removed the sindex() function completely. This patch is thus obsolete.