Closed dirk closed 11 years ago
@bakkdoor Since it looks like a lot of performance gains can be made by implementing bytecode versions of some hot methods, what do you think about leaving the original method definitions in the main class file (eg. lib/array.fy
) and then overwriting them in the VM with dynamic_method
calls in some explicitly-bytecode-assembly file (eg. lib/bytecode/array.fy
)? This way the original definition and documentation would be in the nice uncluttered main library file, and then the fast semantically-identical version would be in the ugly bytecodes file.
@dirk I like that idea. I think we should do it that way. It makes for easy documentation and letting people find the high-level definition of a method (if they want to look up how it works) but gives us good performance.
Okay cool. Will have that commit in here in a bit.
Essentially an implementation of the
match
condition in tighter bytecode. Casual performance tests show the speed boost can be as much as twice as fast for esoteric,[]
-call-heavy programs.This is also fixes a bug in
Object#fancy_methods
since Symbols currently don't have anincludes?:
method.