-
Notifications
You must be signed in to change notification settings - Fork 848
IntrusiveHashMap: Refresh TSHashTable for C++ eleventy. #3955
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
IntrusiveHashMap: Refresh TSHashTable for C++ eleventy. #3955
Conversation
CMakeLists.txt
Outdated
| lib/ts/Tokenizer.h | ||
| lib/ts/Trie.h | ||
| lib/ts/TsBuffer.h | ||
| lib/ts/ts_meta.h |
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.
What is this for?
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.
There just a few comments in that header file to explain what it does...
It was part of some work that ended up in the bit bucket. This enabled optional types / functions in the template parameter H. The point was to allow overrides of certain deduced types. For example, H::value_type would override the type deduced from the link accessor methods but would not be required. Unfortunately the additional implementation effort to make that work was, IMHO, too much work for not enough return - the accessors in H can handle that, if needed, more easily. Mostly I forgot this was still here, but I do have some other use cases planned and I might well still use it for this work, so I'd rather leave it in. I suppose I could split that out in to a separate commit.
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 spent my precious time to find places that require this :-)
shinrich
left a comment
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.
Looks good to me. But agree with @maskit that we may want to remove the ts_meta.h and add it back in a future PR where it is actually used.
|
If you're going to gang up on me, I'll pull it out, but @shinrich will need to re-approve then. |
f24d43d to
b4d5c31
Compare
|
Why are we introducing another hash table? This is not what we talked about doing in Cork. I thought we were going to look at doing a C++ wrapper around Concurrency Kit? |
|
As noted in the initial comment, this is a refresh of |
|
Note that #4029 is part of the work of this upgrade, replacing |
|
The comment says it is a replacement for TSHashTable, but looking at the commit is an additional hash table. I see that there is another PR that has plans to remove IntrusiveHashMap, but was not referenced here. What features does this add that you need? I worry that we are going down the path of relying on our own data structures that are immature and not well tested and will result in maintenance and incompatibility between versions. I looked at the other two PRs that are going to use IntrusiveHashMap and it looks like they will be using them in a concurrent access pattern which mean that this hash table is solving the wrong problem. |
|
Some of the features are:
What I really need this for are other uses, e.g. the work to eliminate For many of the other uses, the intrusive nature of the hash map is critical, as I want to use it in conjunction with This isn't needed for most (all?) of the replacement uses, but I have suggested use of classes such as
What then should I do? Not replace |
|
We should use I don't see how this has a relation to getting rid of |
|
For the specific case of the session manager, For other cases, I have already made the argument that the memory allocation characteristics of
|
b4d5c31 to
0cae6de
Compare
0cae6de to
8c63251
Compare
shinrich
left a comment
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.
Re-approving after the conflict resolution.
This is a replacement for
TSHashTableand eventually TCL hash tables.