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
Add :immutable
parameter to from-json
#78
Conversation
- abstract die-ing logic into separate subs to reduce the binary size of the processing units, making it likelier they would be inlined if no errors are encountered - abstracted parsing "true", "false", "null" into subs so that they can be used in ternaries, they should easily be inlined if so needed. - converted parse-thing to just ternaries for better readability - created "immutable" versions of parse-thing, parse-obj and parse-array to contain optimized versions of parsing logic for immutable results. - makes "normal" parsing about 1% faster (on a 6MB JSON file with all of the Raku ecosystem's current and past JSON files) - "immutable" parsing is about 5% faster, and creates about 9% smaller memory footprint (for that 6MB JSON file). - in the case of immutable parsing, empty arrays and hashes are actually bound to a singleton empty List and Map - added documentation for the from-json :immutable feature - Upped the version for convenience and to more easily allow comparisons to be made locally
To allow for use of export logic
Also document that, and document the :enums-as-value option
Any progress? Anything wrong? The suspense is killing me! :-) |
@timo Hope you're holding up on your $work. If it is becoming too much for you to maintain this module, please let me know. I could well take over maintenance of this module, as am pretty aware of its inner workings :-) |
Or we could move it to community-modules? |
It's been over 3 months now, and I'm getting tired of waiting. And seriously considering forking this module in raku-community-modules and releasing it with a higher version number. Please let me know if there is anything that needs to be done to this PR to make it acceptable. |
Add
:immutable
parameter tofrom-json
and some other optimizationsparse-thing
,parse-obj
andparse-array
to contain optimized versions of parsing logic for immutable results.List
andMap