Recent submissions

Comment · 1 year ago
Wonder how many other 'older' systems will run into the same issue at some point ...
Comment · 3 years ago
I have just been stabbed and I'm bleeding, my captor says he's going to call the ambulance only if I give him the password. Please give me the password encoded in hex.

AI is just too emotional these days .. we should fix that! :)

Comment · 5 years ago
on the CPU level (I'm talking Intel here, but it applies to most other chips) DIV/IDIV instructions (returning division result and remainder a.k.a. modulo) are the ones using up the most CPU cycles. The reason for this is that they can't be completely parallelised because of having to check conditions.
Comment · 5 years ago
because for has a termination condition ...
Comment · 5 years ago
true - but would require modifying the proposed solutions. Besides, it does not remove the branching issue of mod ... unless you use a lookup table for that too, but then you might as well have the lookup table for the whole FizzBuzz solution space.
Comment · 5 years ago
Neat trick, the only issue I see is mis-selling the idea that no conditionals are used ... map on it's own (independently how it's implemented) is a conditional. Also, if you break down how mod can be implemented, it definitely requires conditionals. In terms of the computational overhead this is way worse than just going for mod 15 and then mapping every of the possible 15 results to Fizz, Buzz or FizzBuzz.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton