I profiled the Rakudo build process to produce src/gen_grammar.pir. Over half of execution time comes from iterating through UTF-8 strings character by character. Callgrind reported 9,392,146,023 operations.
I rebuilt Parrot with ICU installed and made PGE;Perl6Grammar transcode all incoming strings to the UCS-2 encoding. Callgrind reported 3,862,625,957 operations. Random indexed access into variable-width encoded strings is very expensive. (The process isn't quite sufficient to rebuild all of Rakudo, as some generated files appear partially encoded in UCS-2.) -- c _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
