Re: Register arbitrary types Framework - Mailing list pgsql-jdbc

From Markus Schaber
Subject Re: Register arbitrary types Framework
Date
Msg-id 20040319002648.0f821e79@kingfisher.intern.logi-track.com
Whole thread Raw
In response to Re: Register arbitrary types Framework  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Hi, Oliver,

On Fri, 19 Mar 2004 10:19:58 +1300
Oliver Jowett <oliver@opencloud.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@logi-track.com | www.logi-track.com

pgsql-jdbc by date:

Previous
From: Markus Schaber
Date:
Subject: Re: Register arbitrary types Framework
Next
From: Fuchs Clemens
Date:
Subject: Re: BYTEA with large files leads to OutOfMemory