Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex and UniStr #63

Open
bkamins opened this issue Mar 10, 2018 · 4 comments
Open

Regex and UniStr #63

bkamins opened this issue Mar 10, 2018 · 4 comments

Comments

@bkamins
Copy link

bkamins commented Mar 10, 2018

Working with regexes on UniStr will be slow as currently all has to be converted to String to work (regex as well as the string in which we look for it).

@ScottPJones
Copy link
Member

Yes, that's only for the moment. For ASCIIStr and LatinStr, the same library can be used, and will be faster than using UTF-8, it's a matter of a flag passed to the library. For regex on UCS2Str (and _UCS2Str), and UTF16Str, those will need version of the PCRE library compiled for 2 byte, and UTF32Str will need it compiled for 4 byte.
For the moment, as long as it is working, I'm happy, I'll deal with the performance issues of regexes later, after everything else is working correctly.

@bkamins
Copy link
Author

bkamins commented Mar 11, 2018

Agreed. I just wanted to leave it open as it is an end-user critical part that will require changes to both: how "Regex" object is constructed and how it is called.

@ScottPJones
Copy link
Member

BTW, I really appreciate your thoughtful reviews and ideas!

@ScottPJones
Copy link
Member

If you have a chance, please take a look at the Regex support that I just added.
For now, it's just for Str types where the codeunit is UInt8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants