On Friday, 4 March 2022 at 19:51:44 UTC, matheus wrote:

OK but there is another problem, I tested your version and mine and there is a HUGE difference in speed:

    string s, str = "4A0B1de!2C9~6";

Unless I did something wrong (If anything please tell). By the way on DMD was worse, it was like 5x slower in your version.

To add to the already-mentioned difference in allocation strategies, try replacing the input with e.g. a command-line argument. Looping over a literal may be skewing the results.

Reply via email to