[fpc-devel] Unicode resource strings

Marco van de Voort marcov at stack.nl
Tue Aug 21 12:32:44 CEST 2012

In our previous episode, Graeme Geldenhuys said:
> On 21 August 2012 10:19, Ivanko B <ivankob4mse2 at gmail.com> wrote:
> > Sure no problems for GUI. But how about processing large texts ?
> Same experience as before. I must add "processing large text" is a
> vague statement.

I think unicode or not is a bigger performance hit than utf8 vs utf16.

All routines like capitalization (routinely used for case insensitve
comparison) get a lot more complicated. Many routines must forfeit
their simple charset loops and will do a call for any  set test.

utf8<->utf16<- any 256 char (ansi) charset conversion operations are fairly
simple and mechanical operations that don't need much context.  They are
probably much cheaper than a single uppercase that we routinely for case
insensitive comparisons.

utf8/16 -> ansi are a bit more involved. (since mapping many chars to few,
naieve implementation requiring large lookupsets)

More information about the fpc-devel mailing list