> little do they know Ruby is a slower language than Go
Isn't it generally expected for a feature-packed interpreted language to be slower than a minimal compiled language?
> little do they know Ruby is a slower language than Go
Isn't it generally expected for a feature-packed interpreted language to be slower than a minimal compiled language?
Ruby is compiled, it JIT compiles the code, in theory it should be on par with go once the compiler works out all the code paths, in a long-running application, you should expect the whole codebase to be compiled eventually. More:
https://www.codemancers.com/blog/rubys-jit-journey
There is a big difference between JIT compiled _dynamic_ language and ahead of time compiled static language. While modern JS engines show that difference sometimes can be narrowed down with sophisticated JIT and runtime, it is still there.
Ruby's YJIT compiler does compile ahead of time, the details are in the link provided. On the first run it will, if feasible, compile blocks of frequently executed code and stow it away for when it's needed next. So only on the first run is it interpreting everything.
Generally being interpreted or compiled is a property of the implementation, not the language.