This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
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.
API simplification #118
API simplification #118
Changes from all commits
2d3a354
91d3a05
11c0bbe
b91bb05
ce9dbbe
ddbf012
ad44c43
62d9ad6
740a1d6
b503702
70278fa
aac381a
7339a87
5caccfe
ed10363
99e3fe0
6fc2c06
b9f18c1
d77902f
df06ca5
1e23409
a691b68
09a7b5a
880e4a5
60426f1
db2675c
02c2b2d
770e915
fedfe26
b659547
aaec095
0e493ae
caaa850
0ea6323
1c065f5
dd87d53
c0d8333
c83a418
90601f3
fb18c94
77c62d6
e0e2beb
0d6b179
d2484b4
2dfb3d4
f6f6d02
7f652a1
cd5448a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We could also have stored the result of the
len
we did on thekvs
above. Micro-optimisation, mind you ;-)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.
Actually, IIRC
len
is constant time, unlike C'sstrlen
which is O(n) and justifies caching the length to reuse it.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.
Not just constant time - it can even be registerised if the compiler decides it's worth it :)
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 knew it was constant time, but pushing it to the register, I didn't.