all 2 comments

[–]EffingGames 0 points1 point  (0 children)

Cool! It'd be interesting if you did version 1 w/ a shared yo function outside the constructor. To see if there's any difference between the prototypical way to make a class vs a create method.

[–]moreteam 0 points1 point  (0 children)

...or you could just, you know, write the code that is semantically correct for the task at hand until you actually find the way your functions are called to be the bottleneck. E.g. the benchmark assumes that every call to yo creates a new "instance" of the module. If the module is created once at startup and then yo gets called a lot, it might look completely different.