-
Notifications
You must be signed in to change notification settings - Fork 84
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
Observations #389
Comments
I'll have to read up on ownable but I am not sure that works since string parsing for owned values is different and I'm not aware of a way to have different implementations for a function solely based on lifetime.
that's worth benchmarking, but I don't have high hopes since COW right now uses a zero-copy approach, which will be more performant than inlining - it might also increase the size of the value struct, which would not be great.
there isn't, but there could be I guess, but it is questionable if it is faster, then we need to re-do utf8 validation as it should re-use the same registers as the parsing. That said it got crated out at one point so I am not 100% sure the compiler still does that - but if it doesn't it's a bug and should be fixed as one :)
|
These are some observations I've made while reading through the documentation and the code. These are not things that necessarily need to be resolved, but I wanted to write them down as they are my impressions from reading through the codebase for the first time.
likely!
,unlikely!
,static_cast_*!
,stry!
,SIMDINPUT_LENGTH
,SIMDJSON_PADDING
)OwnedValue
could just beBorrowedValue
with something like the ownable traits to remove the lifetime when necessary. And forto_owned_value
can just return aBorrowedValue<'static>
.beef::lean::Cow
withHipStr
, which inlines strings up to 23 bytespub use crate::value::*
which hides everything it re-exports behind a*
Prelude to include needed traits
for every trait and modulevalue-trait
)If anything here is wrong or for a reason I don't know, please correct me!
The text was updated successfully, but these errors were encountered: