I have a potentially silly sounding question considering the fact that there are several conventional ways of doing it, but I was wondering if anyone knows of a fast way of computing the ASCII value of a whole string of characters. Possibly using some sort of bit-filddling hacks. The conventional or my approach is to convert the string to a char array and then type cast every element to int and add every value obtained to compute the total ASCII value of the string.
Apparently, its an O(n) way of doing it becoz of the loop that has to iterate over the length of the array. Is there a way to reduce this computation time? Appreciate any help guys.