Wednesday, September 10, 2008

Re: [HACKERS] Base64 decode/encode performance

On Wed, Sep 10, 2008 at 10:44:00AM -0400, Mark Mielke wrote:
> >There are 2 killer problems:
> >
> >- decode does not seem to handle architectures that segfault
> > on unaligned int32 accesses.
>
> Out of curiosity - does this problem exist on any platform for which
> PostgreSQL is currently ported and supported?

It exists on most CPUs actually like Alpha/Sparc/MIPS, just not on
Intel chips, which is why you don't see them very often. Unaligned
accesses do take twice as long to execute though, even on Intel chips.
On some OSes the unaligned access is trapped and emulated by the OS,
which doesn't do much for performance.

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

No comments: