4 ms·
Notice: this is written in fairly nicely-written C, not ASM with demoscene level micro-optimizations, like you might expect. Goes to show how much you can get
by normac2 5y ago
Notice: this is written in fairly nicely-written C, not ASM with demoscene level micro-optimizations, like you might expect.
Goes to show how much you can get out of hardware just by writing code sensibly in a native language (and native libs/tools, of course).
- Cullinet 5y agoC isn't in my mind close to the metal but potentially lets you be more sympathetic to the metal. Thanks for your drawing attention to this, I'm looking forward to reading.
- normac2 5y agoWell, at the very least it's close in that it's native compiled (and not in a very abstracted way like JIT languages mostly are).
- pjmlp 5y agoC like any other language, also has JITs and scripting implementations to chose from. WASM, MSIL, Tendra, TIMI are all examples of JIT/AOT implementation that have C (or C++) as part of their source languages.
- mvanaltvorst 5y ago> Goes to show how much you can get out of hardware just by writing code sensibly in a native language (and native libs/tools, of course). Personally, I find this a far less impressive demo of the SuperH SH-4 CPU than, say, Doom running on a graphical calculator. A http server (not https) simply opens sockets, writes a string, and closes the socket, a task which is usually purely I/O bound. Implement something basic like HTTPS (introduced in 1994) and watch this CPU grind to a halt.
- Uberphallus 5y agoI agree with the feeling, it's not really that impressive, but the HTTPS mention isn't accurate. Performance would be certainly lower, but remember the SH-4 was in the Dreamcast. You can buy some niche boards[0] with SH-4, and I assure you, they can run Debian and they do SSL just fine. [0]https://www.apnet.co.jp/product/superh/ https://www.apnet.co.jp/product/superh/
- veltas 5y agoMy experience in 8-bit is you can write 80% in C and then just focus and optimise the bits that need it in assembly. The rule is the same as ever, don't prematurely optimise (i.e. by writing everything in assembly), but the amount that needs optimisation is a bit bigger.