Next | Making Programs Faster | 97 |
"So apparently an eval block is significantly faster than calling eval() on a scalar."
Yep, benchmarks show that it's 170 times faster
But that's because it doesn't actually evaluate anything
Whoops
If you have code in a string, and you want to execute the code, you must use 'string eval'
Asking whether string or block eval is faster is The Wrong Question
It's like asking whether a screwdriver is faster than blinking your eyes
You can blink your eyes a lot faster than you can use a screwdriver
But it won't help you get that screw in
Next | Copyright © 2003 M. J. Dominus |