i never knew that intellij Go plugin now does the full profiling thing... so i can watch flamegraphs and dig into the code that is making them

about 40% of the execution time is from my tag processing and of that 40% is just making slices

so if i can find a way to eliminate all that slice making or reduce it i can win another ~12% on the decoder

the next biggest thing after that is hex.EncodeToString, i'm not sure how much this entails but i'm now going to designate it as my first target, since i know i'm aiming to turn 32 bytes into 64 chars hex, and probably i can eliminate that just by making a 32 bytes to 64 hex encoding buffer

well, these are the two decoding bottlenecks anyway, i only have to chop 20% out and i win

*laughs in provocation*

Reply to this note

Please Login to reply.

Discussion

this is why i thought about the idea of going straight between binary and json, the intermediate format inside the program is a two step conversion process every time for nothing

all you need is a way to extract fields from the binary and from the json quickly without making any memory copies, and you can actually abolish the intermediate format

anyway, that's the gist of the idea... let's see how this works out in real life

i'm just gonna start with eliminating the use of strings in the primary data structure

this is a remarkably pervasive change

also, i hate go strings, they should never be used for any serious work, they should just be removed from the language, and rusticles, they are the only immutable thing in the language, and they are useless, yet you have to write mut mut mut mut you stupid morons

newsflash: writing endless bounds of write only shit in the MMU is a fucking waste