http://qs321.pair.com?node_id=1078648


in reply to Re^5: Given When Syntax
in thread Given When Syntax

BTW as it seems you are also "proving" that gotos to labels with code execution are faster then simple hash look ups.

The difference might come from something else, such as the use of a regex on the one hand, and of substr on the other hand for extracting the first digit. I did not change them because I wanted to use the various solutions as posted, or as close as possible to the way they were posted. After all, the way to get the first digit is also part of the solution. But, of course, if one wants to compare only the process for finding the values associated with that digit, then the easiest is to remove the digit extraction part by passing a single integer to the function. That was not my goal when posting the benchmark above, but I can certainly do that later when I get home, but not right now.