in reply to Re^3: Risque Romantic Rosetta Roman Race
in thread Risque Romantic Rosetta Roman Race

Ha ha, I'd already tried that and couldn't measure any difference. I'd also tried losing the uc function by increasing the hash to include lower case letters, but that was a bit slower. Update: hippo suggested that while I was typing. :)

The most promising approach may be to find an alternative to:

M=>1000, D=>500, C=>100, L=>50, X=>10, V=>5, I=>1
to do the mapping. For example, 'M1000D500C100L50X10V5I1' and use a regex or something. I made a few half-hearted attempts but didn't find anything faster.

It might also be faster to remove the reduce and do the summing in another uglier way ... but reduce is so elegant I couldn't bring myself to try anything along those lines, that would be like losing an old friend. :)