Re: Base64 decode/encode performance

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
Cc: Marko Kreen <markokr(at)gmail(dot)com>, Gaetano Mendola <mendola(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Base64 decode/encode performance
Date: 2008-09-10 15:25:56
Message-ID: 20080910152556.GE27812@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message tomas 2008-09-10 15:30:40 Re: Base64 decode/encode performance
Previous Message Zdenek Kotala 2008-09-10 15:14:13 Re: New FSM patch