-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manpage #98
Merged
Merged
Manpage #98
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b30c096
manpage: consistent spelling 'database'; consistent double space afte…
benjub 93f4ffb
README.TXT: consistent spelling 'database'
benjub 8ce9dba
add bib words criterion/criteria
benjub ba94c56
fix typo mmhlpb.c-->mmhlpa.c
benjub e97c24d
sort list of keywords alphabetically
benjub e1083de
reorder list of keywords
benjub a64621b
comment indentation
benjub File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list is searched sequentially. Matching an item at the beginning is obviously way more efficient (1 comparison) than one at the end (40 comparisons). So if you know, the keyword in str2 is 'theorem' 70% of the time, it makes some sense, to have it at the beginning. This is the gist of the deleted comment here. I think, the first 5 elements of the old list were deliberately put in the early position for speed up. The tail starting with 'AXIOM' are matched fairly seldom, so their exact position does not really matter, and we can keep an alphabetic order there, without compromising speed to a noticeable degree.
What do I personally think of it? Well, if search time really matters, than there are better strategies around, like binary search, for example. This is a poor man's optimization. It may have an improving effect, though, depending on how often a search is called. Without knowing details, I would keep the first five elements, but order the tail.
The 0 in the beginning of the list is likely optimized out and just there to keep all items, including the first, in the same textual format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a technical point of view, I do not object to this PR any more, unless you see a slow down due to the impoverished search.
Maybe one should add a
// ---- end of optimized search -----
in between head and tail of the list, for better understanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know C well enough, so I rely on you here. What order do you prefer ? Is the following ok (including comments) ?
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. That's the content of my latest commit. So I guess you can approve. (On this repository, I have no right to approve or merge --- and am not asking for one.)