-
Notifications
You must be signed in to change notification settings - Fork 203
Atomic keys introduction for strings, symbols, small numbers. #785
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
Conversation
8249156 to
3089c10
Compare
|
Added njs_cnst.[ch]. It is intermediate commit, the hash itself and unique pre-atomized njs_cnst.vs._STRING_NAMES will be used in next commits. |
xeioex
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.
Suggested commit log:
Added predefined strings hash.
See my patches that address issues/improvements found by me here https://github.com/xeioex/njs/tree/atomic_strings
c7af9fe to
2251eaa
Compare
011a4bb to
c70d1b3
Compare
xeioex
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.
See the patch for the mentioned issues/improvements here 965d68f
af00685 to
58cd9f5
Compare
58cd9f5 to
99a3a62
Compare
36a797e to
99fd61d
Compare
|
squashed working commits to simplify history |
0d49cc0 to
c329285
Compare
|
force-push missed change for njs_global_this_prop_handler() |
c329285 to
1344303
Compare
|
polished a bit change for njs_global_this_prop_handler() |
1344303 to
b00efbb
Compare
|
It is incremental patch. |
b00efbb to
7f21d59
Compare
|
small reordering applied |
7f21d59 to
a31286f
Compare
|
Now atom_ids are used in the code. All local tests are passed. To be squashed later, I'll add optional stuff soon (additional optimizations, randomized atom_ids, etc) |
a31286f to
d77fe57
Compare
|
Series of working commits are squashed to simplify history. Need take a look at still missed inline optimizations and replacing 'njs_value_t name' by atom_id in njs_object_prop_t. |
d77fe57 to
3810cb3
Compare
|
Now performance is same as in my initial sandbox. Looking at replacing 'njs_value_t name' by atom_id in njs_object_prop_t. |
969992d to
26e64d2
Compare
26e64d2 to
2d97e80
Compare
Proposed changes
(This PR is clone of unintentionally closed PR 777)
This is series of commits which introduce internal atomic representation for
strings, symbols and small numbers as keys for access object properties.
These commits are intended to speed up access to object properties.
Step 1:
Remove long strings from njs core to simplify code and make it more regular.
Reserve atom_id field in njs_value_t.
Notes:
a) Each commit is fully and successfully tested for regressions with all local tests;
b) This PR is draft for internal review, I'll extend it by additional commits as
they will be merged here from my hg sandbox.
c) As soon as last commit will be added/reviewed, draft status from this PR can be removed,
and PR applied then.
Checklist
Before creating a PR, run through this checklist and mark each as complete:
CONTRIBUTINGdocument