<ryanstout>
I would say doing numerical stuff is not a normal use case
DouweM has quit [Quit: Leaving...]
<ryanstout>
since opal will have more method calls, maybe its an issue with the jit’s not optimizing such a deep stack. I’ve found with volt, performance is good.
<ryanstout>
but thats more of a standard JS use case, which the JIT’s are better at optimizing I think
tils has quit [Remote host closed the connection]
<meh`_>
ryanstout, the JIT is very good at inlining method calls
<meh`_>
ryanstout, I benchmarked some array access few weeks ago
<meh`_>
accessing an Array (direct access) and a subclass of Array (method_missing access) the performance was exactly the same
<meh`_>
and yes, if you're doing math in Ruby you must be crazy in many cases :)
<ryanstout>
meh`_: so you think issue #520 is something else? It may not apply, but I’ve seen in the JVM where things that get a really deep stack don’t get JITted
<meh`_>
ryanstout, it is something else
<ryanstout>
ok
<meh`_>
2 + 2 in JavaScript is never a method call
<ryanstout>
yea, but my point was that those should get inlined to just the JS math stuff right?
<meh`_>
and remember in Ruby, operators have coerce semantics and other checks
<meh`_>
so it's not just a `a + b`
<ryanstout>
ah, maybe thats part of it
<ryanstout>
more checks
<meh`_>
we're also 90% slower on ifs
<meh`_>
why? because we have to work around the retarded semantics of JS
<ryanstout>
hehe, yea
<meh`_>
but in a general web application scenario, the overhead is irrelevant
<ryanstout>
I’ve been using it with volt, and all of my performance issues have been algorithmic
<ryanstout>
yea
<meh`_>
because the overhead lies in the DOM
<meh`_>
if you need math stuff, you write it in js
<meh`_>
you wrap an existing js library
<ryanstout>
yea
<meh`_>
Ruby will always be slower than JavaScript
<meh`_>
even in a specialized VM for Ruby
<meh`_>
it cannot be faster
<meh`_>
they're limits in the design of the language
<meh`_>
there are always downsides
<meh`_>
you value more sane semantics and ease of development over raw speed
<meh`_>
otherwise we'd all be writing fortran
<meh`_>
or asm
<ryanstout>
yea
[o__o] has joined #opal
GitHub169 has joined #opal
<GitHub169>
opal/master f2324db Elia Schito: Let the Util module to rely on a "Command" class