[Issue 7515] The new std.string.translate is slow for ASCII text
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 6 04:13:54 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7515
--- Comment #2 from bearophile_hugs at eml.cc 2012-03-06 04:13:54 PST ---
(In reply to comment #1)
> https://github.com/D-Programming-Language/phobos/pull/478
Thank you. Your patch seems nice.
Two suggestions:
1) If they don't already say it, then I suggest to add in the ddoc of the
functions that the translation arrays have a length 128. This for both old D
programmers and Python programmers.
2) This code in translate():
+ bool[128] remTable;
+
+ remTable[] = false;
I suggest to write it like this, that's shorter and avoids a double
initialization:
+ bool[128] remTable = false;
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list