You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I devised a fast logarithmic string length algorithm based on carefully building string type patterns which is surprisingly tedious due to ${string}${string} simplifying to ${string} so we need to add an extra character $ before and after during all of our checks.
Anyways, this string length algorithm supports getting the length of strings up to 10,000 characters long (uses tuples for math). However, you could add an alternate path after the cache gets to 2^13 (8,192) to use your arbitrary math type to support more strings up until a very large size due to beauty of the logarithmic scale.
I devised a fast logarithmic string length algorithm based on carefully building string type patterns which is surprisingly tedious due to
${string}${string}
simplifying to${string}
so we need to add an extra character$
before and after during all of our checks.Anyways, this string length algorithm supports getting the length of strings up to 10,000 characters long (uses tuples for math). However, you could add an alternate path after the cache gets to 2^13 (8,192) to use your arbitrary math type to support more strings up until a very large size due to beauty of the logarithmic scale.
The code is quite ugly so there still might be some opportunities for simplification.
The text was updated successfully, but these errors were encountered: