11 ms·
Note that Go is a language where it is well known how to optimize large parts of the runtime. The language design is sane, especially for execution speed. Ruby
by jlouis 13y ago
Note that Go is a language where it is well known how to optimize large parts of the runtime. The language design is sane, especially for execution speed.
Ruby and JS are very expressive languages, but their design in semantics make a lot of optimizations nontrivial to carry out. In essence you need to figure out type information at runtime and then use another JIT pass on the code to make it run fast. This is way more complex than what you can do in a simple Go compiler.
Note that a rather unoptimizing Go compiler produces code way faster than V8 or a Ruby interpreter has ever produced. This is what you can expect once your language design has few trouble spots w.r.t. optimizations.