this post was submitted on 05 Nov 2024
96 points (99.0% liked)

The Dredge Tank

293 readers
2 users here now

The Dredge Tank. For posting all the low tier reactionary bullshit that you can't post anywhere else. Got some bullshit from Reddit with 2 upvotes and want to share, post it here.

This community was created with the purpose that Rule 8 fans will just block it.

The rules are literally The Dunk Tank's rules, just without rule 8.

Rule 1: All posts must include links to the subject matter, and no identifying information should be redacted.

Rule 2: If your source is a reactionary website, please use archive.is instead of linking directly.

Rule 3: No sectarianism.

Rule 4: TERF/SWERFs Not Welcome

Rule 5: No ableism of any kind (that includes stuff like libt*rd)

Rule 6: Do not post fellow hexbears.

Rule 7: Do not individually target other instances' admins or moderators.

founded 4 months ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] DaPorkchop_@lemmy.ml 2 points 1 month ago (1 children)

A reasonable compiler could optimize this into a bitwise AND, load the pointer to the appropriate string constant into a register branchlessly using a lookup table or cmov instruction, and then execute a single call to printf.

[–] plinky@hexbear.net 1 points 1 month ago* (last edited 1 month ago)

I mean if I want to know the precise number, like 40012 or whatever. Obviously single call is fast, but printf of 40000 strings single strings is meh. I mean in my variant I don’t run comparison, even bitwise, just 80000 rand and sum, single ceil and print