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.
I mean, I could use a little break from Rust and Roto, and I'm itching to write. Might aswell put that itch to good use!
But now I nap, doggy's already there, and she needs belly scratches.
Lets do some Markov bullshit.
❯ curl http://localhost:42069/hello-fedi
Work camps. (As Barry is stick to it) BARRY== Very.
We're back in business.
10 word markov bullshit with a release build: ~145k req/sec
Same thing with the opt profile: ~153k req/sec
I'm happy with this speed.
Out of curiosity, I looked at how fast a 1000 word monster is: ~75k req/sec. Still about 50x faster than the TLS handshake necessary on Eru.
(Granted, the benchmark isn't running on Eru, the difference wouldn't be that staggering there, but TLS would still be an order of magnitude slower.)
I'm going to commit this bit, merge it to main, then I will poke at reworking iocaine's website. I don't feel like working on Roto for the rest of the day, not even with the best music1 blasting into my ears.
I crave me some docs.
Thy Catafalque: XIII. Sárga Erdő, and Dunnák alatt kék mező, in particular - but the rest of the album is pure perfection. ↩︎
"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.