4 ms·
Is this the same with Crystal, as shown in Ruby: irb(main):001:0> "".methods.size => 170 irb(main):002:0> 0.methods.size => 133 If it is, I mean, I d
by pimeys 10y ago
Is this the same with Crystal, as shown in Ruby:
irb(main):001:0> "".methods.size
=> 170
irb(main):002:0> 0.methods.size
=> 133
If it is, I mean, I don't see it being so fast.
- yxhuvud 10y agoWhat on earth has the size of the list of methods to do with performance?
- coltonv 10y agoThe number of methods in the standard library really doesn't impact performance in a compiled language since you can tree shake the stuff that isn't used. And even if you don't tree shake having lots of methods isn't really a noticable performance loss in compile to binary languages since you don't need to spin up a VM