Skip to content

Commit 5d746c6

Browse files
authored
improv: HighPerfFractus (#10)
* Added some improvement to encoding * did some good improvement encoding goes close to 0 allocs but above it when using some data type from which we can't avoid allocs like slice * adding utils edits * made huge improvement: *decide to change from storing offset of var to linear ready cause this saves us trouble and is easier - errors can be detected early on - encoding format is now consistent - expected size is exactly as you expect it - encoding went to around 1 allocs/ op which is big progress - e-ncoding same struct twice gives us 0 allocs To Do: -perform a complete migration from fractus to HighPerfFractus Maybe keeping the naming as fractus - Make naming consistent right now they are lot of test variables that are not needed - format all files - write a complete documentation for this version - showcase improvement compared to previous versions - Expose only functions that should be usable by user (eg; FixedSize -> fixedSize) - Comment the code(at least critical part) Achieve Goals: - Allocs reduced greatly from around 20 to 0 - time taken reduce from 1000ns/op to 200ns/op or less * added comments fixed unsafe usage for encoding added a test to compare result of unsafe and non-unsafe encodings added comments related to possible merging * Optimize memory allocation in Decode function and add tests for uint16 handling * removed unused functions and completed unsafe implementation for other types * improved fuzzing added handling of empty strings * formatted files removed previous implementation completed migration
1 parent 1dfb1bf commit 5d746c6

File tree

6 files changed

+203
-723
lines changed

6 files changed

+203
-723
lines changed

fractus.go

Lines changed: 0 additions & 314 deletions
This file was deleted.

0 commit comments

Comments
 (0)