This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
Use native MarkerIndex implementation - #114
Merged
Merged
Conversation
Contributor
Author
|
@maxbrunsfeld Do you by chance know the incantation I need to give Travis to use clang to build my module instead of gcc? It seems our |
nathansobo
force-pushed
the
ns-native-marker-index
branch
from
November 20, 2015 04:17
310a7c3 to
f196904
Compare
Contributor
Author
|
Seems like I'm having an issue with the C++11 standard library being available. |
Contributor
|
Currently, in marker-index's |
Contributor
Author
|
@maxbrunsfeld Oh of course, we made it conditional. Do you happen to have an example of the Linux equivalents? And Windows? Did you do this for tree-sitter? |
Contributor
|
Maybe just this: 'cflags_cc': [
'-std=c++0x',
] |
Contributor
Author
|
Looks like you can just leave the library off. I should set up a marker-index travis build. |
nathansobo
force-pushed
the
ns-native-marker-index
branch
from
November 20, 2015 04:38
384a038 to
f196904
Compare
nathansobo
force-pushed
the
ns-native-marker-index
branch
from
November 20, 2015 05:49
f196904 to
211e371
Compare
Contributor
Author
|
🍏 |
Contributor
Author
|
Probably should set this up on AppVeyor to make sure we're 🆒 on Windows. |
Merged
maxbrunsfeld
pushed a commit
that referenced
this pull request
Nov 20, 2015
Use native MarkerIndex implementation
nathansobo
pushed a commit
that referenced
this pull request
Nov 23, 2015
…dex"" This reverts commit 20abdda. Signed-off-by: Max Brunsfeld <[email protected]>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Having implemented a simpler binary-tree algorithm for the
MarkerIndex, I wanted to see what we could gain by dropping it to C++. Tests of both implementations vary pretty dramatically between runs, but I'm seeing roughly the following when searching forein jQuery after 6 runs of each version:So the JS version is definitely more variable, slower overall, and puts more pressure on the garbage collector. A 300-600ms improvement based on my tests. Keep in mind there's a bunch of other stuff going on in this code path, but I wanted to measure a real-world use case for this data structure anyway.