Re: Register arbitrary types Framework
От | Markus Schaber |
---|---|
Тема | Re: Register arbitrary types Framework |
Дата | |
Msg-id | 20040319002648.0f821e79@kingfisher.intern.logi-track.com обсуждение исходный текст |
Ответ на | Re: Register arbitrary types Framework (Oliver Jowett <oliver@opencloud.com>) |
Список | 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 по дате отправления: