sonic
avo
sonic | avo | |
---|---|---|
23 | 10 | |
7,217 | 2,773 | |
3.5% | - | |
8.0 | 6.7 | |
11 days ago | 18 days ago | |
Assembly | Go | |
Apache License 2.0 | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sonic
- How to Visualize and Analyze Data in Open Source Communities
-
Handling high-traffic HTTP requests with JSON payloads
Since most of the time would be spent decoding json, you could try to cut this time using https://github.com/bytedance/sonic or https://github.com/json-iterator/go, both are drop-in replacements for the stdlib, sonic is faster.
- Building a Streaming Platform in Go for Postgres
-
Building a high performance JSON parser
Also worth looking at https://github.com/bytedance/sonic
- Sonic: A fast JSON serializing and deserializing library in Go
- sonic/INTRODUCTION.md at main · bytedance/sonic
-
High-performance JSON parsing in Go
The article inside does not mention this.
-
Toward the Fastest, Compatible JSON Decoder – Sonnet
Good morning.I hope this is not the wrong place to post… so let me introduce my first public Golang package. This is a JSON decoder called Sonnet ( https://github.com/sugawarayuuta/sonnet ) that has given faster results (at least in my environment) than Sonic - https://github.com/bytedance/sonic (which is said that it's the fastest) without the help of assembly!
JSON is a very well-known file format. It is used by everyone who does programming. However, it is also not uncommon to find problems with encoding/json and other third-party libraries. for more… (see https://github.com/sugawarayuuta/sonnet#problems-we-had )
I decided to create a new, standard library-compatible decoder that would be both easy to use and fast.
Thanks for reading, feel free to use, help, or ask questions, I look forward to hearing from you. All benchmarks and other information can be found in the link at the top.
-
Toward the Fastest, Compatible JSON Decoder - Sonnet
Good morning. Let me introduce my first public Go package. This is a JSON decoder called Sonnet ( https://github.com/sugawarayuuta/sonnet ) that has given faster results (at least in my environment) than Sonic (which is said that it's the fastest) without the help of assembly!
-
Looking back on framework benchmark (updates = db writes) what can make Go improved back to be top 10?
I'd say the https://github.com/bytedance/sonic has the fastest encoder due to C and assembly optimization. (Use at your own risk.)
avo
-
From slow to SIMD: A Go optimization story
I wonder whether avo could have been useful here?[1] I mention it because it came up the last time we were talking about AVX operations in go.[2]
1 = https://github.com/mmcloughlin/avo
2 = https://news.ycombinator.com/item?id=34465297
- Portable Efficient Assembly Code-Generator in Higher-Level Python (PeachPy)
-
How to Use AVX512 in Golang
I thought the /r/golang comments on this post were pretty useful[1]. They also introduced me to avo[2], a tool for generating x86 assembly from go that I hadn't seen before. There are some examples listed on the avo github page for generating AVX512 instructions with avo.
1 = https://www.reddit.com/r/golang/comments/10hmh07/how_to_use_...
2 = https://github.com/mmcloughlin/avo
For writing AVX512 from scratch avo is a much better alternative.
-
SIMD Accelerated vector math
Avo is a library that simplifies writing complex go assembly, I found it very useful to figure out how instructions map onto Go's asm syntax. But you could definitely do the translation directly, it's what c2goasm did (couldn't get it to work reliably unfortunately).
-
HaxMap v0.2.0 released, huge performance improvements and added support for 32-bit systems
Curious if you're looking at using avo to write the assembly
-
HaxMap, a concurrent hashmap faster and more memory-efficient than golang's sync.Map
You can use github.com/mmcloughlin/avo for generating the assembly use Go.
-
S2: Fully Snappy compatible compression, faster and better
For normal and "better" mode I am using avo to generate different encoders for different input sizes, with and without Snappy compatibility. That currently outputs about 17k lines of assembly.
-
Branchless Coding in Go (Golang)
You could perhaps just have the Go compiler generate the assembler for your code:
go tool compile -S file.go > file_amd64.s
Then you could verify it doesn't change over time, and choose to begin maintaining by hand if it makes sense.
If you do want to go the route of rolling it yourself, I'd suggest looking into something like Avo: https://github.com/mmcloughlin/avo
-
High precision timer loop.
If you have to go with Assembly, try Avo https://github.com/mmcloughlin/avo
What are some alternatives?
jsoniter - Using encoding/json to load parts of a large json document
sha256-simd - Accelerate SHA256 computations in pure Go using AVX512, SHA Extensions for x86 and ARM64 for ARM. On AVX512 it provides an up to 8x improvement (over 3 GB/s per core). SHA Extensions give a performance boost of close to 4x over native.
fastjson - Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection
dingo - Generated dependency injection containers in go (golang)
encoding - Go package containing implementations of efficient encoding, decoding, and validation APIs.
c2goasm - C to Go Assembly
simdjson - Parsing gigabytes of JSON per second : used by Facebook/Meta Velox, the Node.js runtime, ClickHouse, WatermelonDB, Apache Doris, Milvus, StarRocks
kobopatch-patches - Patches for use with kobopatch.
simdjson-go - Golang port of simdjson: parsing gigabytes of JSON per second
rjson - A fast json parser for go
json-iterator - Low level iterator on the records inside large JSON file.
haxmap - Fastest and most memory efficient golang concurrent hashmap