3 ms·
This complaint of software eating up all the gains made by hardware has been noted since the 80s: https://en.wikipedia.org/wiki/Wirth%27s_law https://en.wikiped
by Jach 8y ago
This complaint of software eating up all the gains made by hardware has been noted since the 80s: https://en.wikipedia.org/wiki/Wirth%27s_law https://en.wikipedia.org/wiki/Wirth%27s_law
Which is to say there's not going to be any sort of "victory" industry-wide here. Still, ranting is fun. My favorite recent-ish writing is linked from https://twitter.com/CarloPescio/status/903603552890834947 https://twitter.com/CarloPescio/status/903603552890834947 Programming as if the Domain (and Performance) Mattered
You can learn new things by keeping up with rants too. The best algorithm depends not only on the broad architecture but even the microarchitecture. Newer generations of Intel CPUs for instance throw many older optimizations out the window, but you'll still get the occasional suggestions for those optimizations from people who haven't kept up to date.
I'm not sure Ruby counts as a dynamic language du jour given how old it is, but I wish more dynamic languages followed the Lisp tradition instead of the interpreted Basic tradition, especially with capabilities that let you optimize dynamically as needed.
* (defun add-opt (x y)
(declare (optimize (speed 3) (space 3) (safety 0) (debug 0)) ; not all these matter in this example, just showing options
(type fixnum x y))
(the fixnum (+ x y)))
ADD-OPT
* (disassemble 'add-opt)
; disassembly for ADD-OPT
; Size: 9 bytes
; 02D0C2FF: 4801FA ADD RDX, RDI ; no-arg-parsing entry point
; 302: 488BE5 MOV RSP, RBP
; 305: F8 CLC
; 306: 5D POP RBP
; 307: C3 RET
- bjpbakker 8y ago> I'm not sure Ruby counts as a dynamic language du jour given how old it is I believe it still did when Gitlab started