Help optimize D solution to phone encoding problem: extremely slow performace.

evilrat evilrat666 at gmail.com
Wed Jan 17 09:15:02 UTC 2024


On Wednesday, 17 January 2024 at 07:11:02 UTC, Renato wrote:
>
> If you want to check your performance, you know you can run the 
> `./benchmark.sh` yourself?

Out of curiosity I've tried to manually run this on Windows and 
it seems that Java generator for these numbers files is "broken", 
the resulting count or print runs fine for both Java and D 
versions provided in your D branch, but fails with generated 
files.

D version complains about bad utf8 encoding.
I've opened the generated file in text editor and it is UTF-16 
(little-endian with BOM).

Tried with adoptium jdk 17 and 21 (former openjdk), but I guess 
it doesn't matter since UTF-16 is default on Windows.


More information about the Digitalmars-d-learn mailing list