https://issues.dlang.org/show_bug.cgi?id=11229

Jon Degenhardt <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |m

--- Comment #1 from Jon Degenhardt <[email protected]> ---
Some comments I made in this forum post:
https://forum.dlang.org/post/[email protected]

Routines like to toLower and asLowerCase call functions that work for all
unicode characters. I was able to create much faster versions by checking if
the character was ascii, then calling either the ascii version or the more
general version. Same is true for a few routines like isNumber. Some have the
ascii check optimization built in, but not all.

If this optimization is added, it might also be useful to add a few common
combinations (or a generic solution, if that's feasible). For example, to check
if a character is alpha-numeric, one currently ORs two tests from the standard
library, isAlpha and isNumber. Putting in an ascii optimization check requires
putting it before doing the OR, rather than inside the tests being ORed.

--

Reply via email to