You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hopefully it's not a big deal to fix the eval... However can you not just define functions rather than strings? You can call them with, and maybe even some arguments...

    bind() implementation, what is the memory footprint compared to creating an anonymous function instead?

    It's not too bad. One memory unit for the function itself, one per parameter, plus one for this, one for code, and maybe others if the function was defined inside another function - but everything else is shared (including the code itself).

    It's going to be a bit better than an anonymous function - check it out with trace() :)


Avatar for Gordon @Gordon started