Re: TypeInfoCache

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: TypeInfoCache
Дата
Msg-id 47736A03.5020009@opencloud.com
обсуждение исходный текст
Ответ на Re: TypeInfoCache  (Daniel Migowski <dmigowski@ikoffice.de>)
Ответы Re: TypeInfoCache  (Daniel Migowski <dmigowski@ikoffice.de>)
Список pgsql-jdbc
Daniel Migowski wrote:

>    getString on text_col took 8.27384ms
>    getCharacterStream on text_col took 14.26489ms
>    Factor: 1.724095462324628
>    getString on varchar_col took 9.57153ms
>    getCharacterStream on varchar_col took 12.76733ms
>    Factor: 1.3338860140437319

> Conclusion: There is no real performance loss even in the worst case
> (which should never occur anyway), so please accept my patch. I wish you
> all a happy new year!

I'm confused. Don't your numbers show a 30%-70% slowdown when using
getCharacterStream()?

Also some quick notes about microbenchmarks:

- 1000 iterations isn't really enough to get useful numbers, try 20,000+
for JIT effects or considerably more for GC effects
- server vs. client JVM can have quite different behaviours, you should
check both
- put your inner benchmark loops in a separate method as some JIT has
method-level granularity
- benchmark the same code path in your warmup loop as you actually
measure the numbers from. In your code, you're benchmarking a different
code path to the one you run in your warmup loop.

-O

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Daniel Migowski
Дата:
Сообщение: Re: TypeInfoCache
Следующее
От: Christian Schröder
Дата:
Сообщение: Re: Missing fields in getColumns() result