go-faster / jx Goto Github PK
View Code? Open in Web Editor NEWjson encoding and decoding
License: MIT License
json encoding and decoding
License: MIT License
Ref: romshark/jscan#1
Currently it can allocate(?) in slow path.
Provide fast decoder for UUIDs, time.Time
, netip.IP
, etc. May be useful for ogen purposes.
See encoding/decoding optimization for UUID ogen-go/ogen#98.
Currently there is nothing on https://pkg.go.dev/github.com/ogen-go/jx
Request “github.com/ogen-go/jx”
does nothing except showing error.
Ref: golang/go#49237
TestDecoder_Skip
instead of Test_skip
)BenchmarkValid
vs BenchmarkSkip
)Currently, float decoder fallbacks to strconv.ParseFloat
and causes []byte
-> string
allocation. Possibly we could avoid such conversion by vendoring float implementation from Go library. Also we should try to improve current float parsing algorithm.
i have a use case where i would like part of my message to be json streamed encoded from reflection, but i would still like to use jx for the remaining encoding, as most requests are small and do not require any reflection.
currently, when the writer is in streaming mode, all calls to Write will cause an error.
i propose to simply flush the buffer and then pass the call to Write, which would allow now other json-encoders to stream into jx's encoder. i did this in a fork https://github.com/elee1766/jx and it seems to be working?
given that the package does not want to do any reflection based encoding, this seems like a good compromise?
Currently we use some bytesets to improve matching speed
Lines 15 to 17 in 3ed0c1e
Lines 47 to 66 in 97d4e11
Lines 242 to 256 in 97d4e11
Lines 211 to 219 in c048666
Line 14 in c048666
Totaly we have 6 sets, 5 of [256]byte
and one [128]byte
, it tooks 256*5 + 128 = 1408 bytes.
In benchmarks it performs well because we use only 1-2 of them.
But it may cause cache pollution and slow down parser in realistic cases.
We need to research real impact of such optimizations and possibly use comparsion instead or merge some sets and use bit masks.
Like #33, but for objects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.