Elektrine lite

← Feed

@vrutberg@masto.nu

Post #1414459

2025-10-30 08:35 UTC

@Catfish_Man Wow, to be honest, this has never even crossed my mind. But now I feel like it should have. :-) In “everyday code”, how much of a practical efficiency win is this? I suppose in code that is more algorithmic in nature (needs to be as efficient and performant as possible), I imagine this could have a real impact, but otherwise?

Replies (1)

  • @Catfish_Man@mastodon.social 2025-10-30 18:10

    @vrutberg as always it depends on the situation. If the relevant code runs once per byte of a file it might be several times faster, if it runs once per draw of a view it will be completely unnoticeable. I ran across it in some code in xcbuild that’s processing a giant pile of paths. (…then I ended up deleting the CollectionOfOne approach too and just doing integer comparisons on the utf8 bytes)

    Open ##1414460