gperf - Patches: patch #9562, Speed up step 4 of...
You are not allowed to post comments on this tracker with your current authentication level.
patch #9562: Speed up step 4 of Search::find_positions()
Submitter: | Frank Wojcik <fwojcik> | ||
Submitted: | Sat 10 Feb 2018 01:01:52 AM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | haible | Open/Closed: | Closed |
Sat 08 Sep 2018 02:10:49 PM UTC, comment #1: |
Bruno Haible <haible> |
Sat 10 Feb 2018 01:01:52 AM UTC, original submission:
Step 4 of Search::find_positions() iterates over all valid pairs of keyword positions to remove. However, removing (x, y) is exactly the same as removing (y, x), meaning the search space is currently iterated over twice as much as it needs to be. The bounds of the for() loops can be rewritten such that it is searched only once.
|
Frank Wojcik <fwojcik> |
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 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-09-08 | haible | Status | None | Done | |
Assigned to | None | haible | |||
Open/Closed | Open | Closed | |||
2018-02-10 | fwojcik | Attached File | - | Added fastersearch.diff, #43225 |
Powered by Savane 3.13-758e.
Corresponding source code
Thanks. I noticed the same thing after handling patch #9561.
Yes, but this is the kind of micro-optimizations that make code hard to read.