[parrot/parrot] a563e3: [core] Optimize utf8_substr. Do not use the utf8 i...

GitHub noreply at github.com
Mon Oct 13 14:29:18 UTC 2014

  Branch: refs/heads/master
  Home:   https://github.com/parrot/parrot
  Commit: a563e376c59a6a23c9cf42897e0b67ee432dae77
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-13 (Mon, 13 Oct 2014)

  Changed paths:
    M src/string/encoding/shared.c
    M src/string/encoding/unicode.h
    M src/string/encoding/utf8.c

  Log Message:
  [core] Optimize utf8_substr. Do not use the utf8 iterator

Use a new utf8_offset function instead. This can be optimized
further if we can guarantee word alignment of the buffers.
Add a special utf8 vtable method for substr.

This is a hot item for perl6, see GH #1097
Timings: from 440s to 388s for the "Stage parse" in perl6.
However without utf8 strings at all (my constant π := pi)
the parse stage is still only 173s.

Do not export the Parrot_utf8skip table anymore, not used
by parrot, nqp, perl6.

More information about the parrot-commits mailing list