Simon Cozens wrote: > On Wed, Aug 01, 2001 at 12:42:42AM -0400, Tim Peters wrote: > > case BINARY_DIVIDE: > > case? Wowsers. Hey, Ruby does that too. We use function pointers, > FWIW. People (including me) have tried using threaded code (http://www.complang.tuwien.ac.at/forth/threaded-code.html) and have not measured any significant advantage. I suspect the opcodes to much longer to evaluate than doing the dispatch. > Oh, and here's our divide, for comparison: > > PP(pp_divide) > { > dSP; dATARGET; tryAMAGICbin(div,opASSIGN); > { > dPOPPOPnnrl; > NV value; > if (right == 0.0) > DIE(aTHX_ "Illegal division by zero"); > value = left / right; > PUSHn( value ); > RETURN; > } > } Does every Perl opcode do a function call? Neil
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4