Re: Register arbitrary types Framework

From: Markus Schaber <schabios(at)logi-track(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: PostGreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org>, Kris Jurka <books(at)ejurka(dot)com>
Subject: Re: Register arbitrary types Framework
Date: 2004-03-18 23:26:48
Message-ID: 20040319002648.0f821e79@kingfisher.intern.logi-track.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi, Oliver,

On Fri, 19 Mar 2004 10:19:58 +1300
Oliver Jowett <oliver(at)opencloud(dot)com> wrote:

> > I also think that the current setObject(int, Object) using an
> > 13-branch if(instanceof)-else construct could be sped up by this -
> > of course, at the cost of creating the appropriate factory classes.
>
> 'instanceof' is such a common VM operation (it's implied by every
> cast) that I'd expect it to be pretty fast. Is a hashmap lookup
> actually faster than an inlined multibranch 'if' for the number of
> comparisons we do?

As I don't have the answer to this question, I invite you to benchmark
this. And you should expect that your results vary with different jvms,
jits and Map implementations (maybe we could use e. G. an apache
commons map).

However, this is why I think reworking the built-in types is to be
discussed. We have to think about speed issues, but also about code
maintenance and clean architecture.

Have a nice sleep,
Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios(at)logi-track(dot)com | www.logi-track.com

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Fuchs Clemens 2004-03-19 05:44:17 Re: BYTEA with large files leads to OutOfMemory
Previous Message Markus Schaber 2004-03-18 22:51:43 Re: Register arbitrary types Framework