Why is std.regex slow, well here is one reason!

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Feb 24 10:27:36 UTC 2023


On 24/02/2023 12:11 PM, Walter Bright wrote:
> On 2/23/2023 12:50 PM, Richard (Rikki) Andrew Cattermole wrote:
>> Everything about std.uni and its tables is about tradeoffs. It is 
>> designed to be opt-in and to be small in binary. If you didn't care 
>> about binary sizes it would be easy enough to have it all in ROM ready 
>> to go, but it'll be over 8mb if you did that (mine is).
> 
> Another way is to generate the tables into a separate file when Phobos 
> is built, and import that file.

We already do this. But instead we just commit the generated files, 
which is a lot better than not having to modify them by hand... *shudder*

>> On that note, I recently looked at Unicode symbols for identifiers; we 
>> can shrink the is alpha LUT in dmd to ~1/9th its current size by 
>> updating to C11 :)
> 
> Let's do it!

I probably should've looked at C23 draft spec to see how they were doing 
it before saying something like this. Because they are not doing the 
ranges anymore. Its a lot more complicated with TR31.

https://open-std.org/JTC1/SC22/WG14/www/docs/n3054.pdf

This will be in the realm of a rewrite I think and certainly DIP 
territory (guess I'm on it for the export/symbol/shared library DIP).

That DIP keeps getting larger and larger... with same scope, who knew 
those innocent looking symbols, all in their tables could be so complicated!


More information about the Digitalmars-d mailing list