Re:A Google Interviewing Story
by Oxryly on Friday November 19, 2010 @08:37PM
(#1923544)
I was assuming a 26 letter alphabet. At that point the shifting, anding and comparing would take place in registers.
[ Parent
| on HN ]
Re:A Google Interviewing Story
by jamesaguilar on Saturday November 20, 2010 @01:54AM
(#1924035)
True, although if there are lower case letters too it could become a problem. At any rate, I'm not sure that the register aspect would improve speed significantly because of the latency of getting the string from main memory. You're still going to get pipeline stalls as you reach portions of the string that are not in the cache.