Which is faster?
Next: Wordlist. After that: fake Markov.
But first: lunch. Nom nom.
While eating, I'm also going to "quickly" benchmark iocaine4 compiled in the release profile vs the opt profile.
The latter has lto = true and codegen-units = 1.
Well, the opt profile is up to 161k req/sec on jpegs, and... "Hello" is at 163k req/sec, so the difference narrowed a tiny bit.
It does show that fake jpeg generation is extremely fast, though. I'm really, really proud of optimizing the shit out of that.
I mean, look at this, this lets me do this other thing.
It's brilliant, if I dare say so myself.
To generate JPEG chunks, I need the chunks to not contain certain bytes. Instead of generating a full buffer and masking the bad bytes out, I made an RNG that masks them out at generation time, and it sits on top of any other seedable RNG, so you can use whatever RNG algo you want, as long as it is seedable.
I should measure the speed between a ~2k random jpeg, and ~2k text. I wonder if JPEG would overtake the string.
~2k random jpeg: ~161k req/sec
~2k static text: ~159k req/sec
I AM A FUCKING MONSTER.
~2k static text, pre-converted to binary: ~162k req/sec
Marginally faster than random jpeg, and this text is entirely static.
WordList done too, only fake-Markov left. I'll do that later tonight. I need a nap.
After the nap: fake Markov, then a bit of NSoE work to exercise the generators, and then a progress report over the weekend.
Then, from next week, templating, then error rework, then script config, then Lua, and then the real fun begins, and I get to reimplement NSoE.
Somewhere before starting on NSoE, I will rebuild https://iocaine.madhouse-project.org/ too.
New theme, new structure. Something that's navigatable on mobile, and doesn't need so many clicks to get to the interesting parts.
Hm. Maybe I will start rebuilding the site over the weekend. Could publish the progress report there, too, rather than on my own blog.
"Hello" is obviously faster. The interesting question is: by how much?
And the answer is: about 4-5k req/sec, which, at this level, is not a whole lot.