(Replying to PARENT post)
> For reference, a Python version of this same loop runs in 1 minute and 38 seconds โฆ a dynamically-typed bytecode interpreter is not a good choice for heavy integer arithmetic.
made me wonder about other dynamic langs.
ruby (3.0.0) and lua (5.4.2) ran it in 1:30 and 1:03 respectively but node (12.22.0) ran it in 0:01. how is node so quick?
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
I wonder how the whole thing compares with the newest Oberon (which should be at around 2900 lines of code or so). After all, if you drink enough beers, Oberon might look like "a subset of Go that can compile itself" to you.
(Replying to PARENT post)
(Replying to PARENT post)
"It can compile itself" is an interesting benchmark of language complexity, and we now have of C and Go, so I wonder how the other common languages would compare. Of course you can "cheat" by choosing a subset that reduces the complexity of the whole.
As you can see, Mugo uses its own very inefficient ABI thatโs nothing like the x86-64 ABI โ the standard ABI puts the first six โcellsโ (64-bit values) in registers.
Considering that stacking args is the norm for 32-bit x86 and few other architectures, it's not that bad, especially since CPUs have special hardware to handle push/pop.
(Replying to PARENT post)