3 ms·
True. I bet the Rust guys would come close too. But realistically? For anything except code golf and nerd fights, the actual client requirement is probably bet
by bigiain 5y ago
True. I bet the Rust guys would come close too.
But realistically? For anything except code golf and nerd fights, the actual client requirement is probably better met by a WordPress widget written in php/html, because what they asked for is something that'll print the fizz buzz all the way up to the person's age when they log into the company website... Nobody is even going to notice if it takes a whole second to fizz buzz all the way to 95 :-)
(Now I'm wondering if that guy's raw hyper optimised x86 assembly can get transpiled to WASM... Because nerd fights are fun.)
- Taywee 5y ago> Now I'm wondering if that guy's raw hyper optimised x86 assembly can get transpiled to WASM Not really. WASM is significantly simpler and more abstract than x86 assembly, and has a JIT compile step that probably wouldn't get anywhere near as optimized. You could probably hand-write a WASM version that would JIT compile to something roughly similar and still get very good performance, but it would probably be more comparable to the other compiled versions at best, rather than the x86 ASM one.
- bigiain 5y ago> probably wouldn't get anywhere near as optimized. Yeah, I'm not doing this for performance, I'm doing out for nerd fight points and the lulz :-) The Most Hightly Optimised Fizz Buzz EVER! In your browser! As a service. Join the waiting list now! Email: [_____________] [submit]
- DeathArrow 5y ago>But realistically? For anything except code golf and nerd fights, the actual client requirement is probably better met by a WordPress widget written in php/html, because what they asked for is something that'll print the fizz buzz all the way up to the person's age when they log into the company website... Nobody is even going to notice if it takes a whole second to fizz buzz all the way to 95 :-) What if 100 million people log from different corners of the world? Would the WordPress widget still cut it?
- bigiain 5y agoIn that scenario, the fizzbuzz widget is gonna be just a tiny tiny part of your WordPress scaling problem…