Lähettäjä: Philip Hazel Päiväys: Vastaanottaja: Zoltán Herczeg Kopio: PCRE Development Mailing List Aihe: Re: [pcre-dev] [Bug 1295] add 32-bit library
On Sun, 28 Oct 2012, Zoltán Herczeg wrote:
> >>The idea is this: the programme that's using the pcre32 API wants to
> >>use it on some data it has. That data isn't only used for matching
> >>however, ie it may also be displayed, etc, and the programme has
> >>therefore stored some flags into the unused-by-UTF-32 high bits of the
> >
> >Wow, wow... stop it right there. Back in the seventies, when we used such techniques, they were
> >already considered IMPOLITE (or shall we say, downright wrong). And in those days, both core
> > (actually real CORE) memory and disk (usually tape) space were expensive so there was some
> > twisted justification for that behavior.
>
> This is a good point. If you have enough free space for utf-32 (where
> you waste 2-3 bytes for nearly all characters), you probably don't
> need those extra bits. I worry about the performance loss. On most
> machines you need two-three instructions to do that masking. Does
> anyone plan to use this?
I too was around in the seventies, and indeed we used to do this kind of
thing because space was very tight. Nowadays one can usually avoid it. I
have to say that if I had done the 32-bit implementation, I would not
have considered including masking.