Using C would also eliminate the need for all those passes. It's faster to do multiple passes in Perl since each pass isthree of the passes are entirely in C.
Here's a trick that's been known to speed things up if most of your data is ASCII: Read four bytes at a time. If none of them have the high bit set, you've just handled 4 chars at once.
The extra work would probably slow Perl down, but it probably speeds up a C solution. Be wary of alignments.
In reply to Re: Faster utf8 escaping.
by ikegami
in thread Faster utf8 escaping.
by kyle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |