Skip to content
Discussion options

You must be logged in to vote

Do you control the initial allocation of the buffer you read your JSON into, and can you pad that initial allocation a bit to match?

There isn't currently a great workaround -- you can use the fallback parser but it doesn't use simd and is slower. There are a couple of reasons we need padding, but one important reason is that we can do faster string processing by reading 8-64 bytes at a time, including when we are at the end of the string (we just retroactively cap the string when we find the end quote).

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
3 replies
@Gun9niR
Comment options

@jkeiser
Comment options

@0AyanamiRei
Comment options

Answer selected by Gun9niR
Comment options

You must be logged in to vote
2 replies
@Gun9niR
Comment options

@jkeiser
Comment options

Comment options

You must be logged in to vote
1 reply
@jkeiser
Comment options

Comment options

You must be logged in to vote
2 replies
@Gun9niR
Comment options

@lemire
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants