Skip site navigation (1) Skip section navigation (2)

Re: Minor performance improvements

From: Kris Jurka <books(at)ejurka(dot)com>
To: Stephen Denne <Stephen(dot)Denne(at)datamail(dot)co(dot)nz>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Minor performance improvements
Date: 2007-02-27 04:24:09
Message-ID: Pine.BSO.4.64.0702262316480.1687@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Tue, 27 Feb 2007, Stephen Denne wrote:

> I'm sad to say that I have not created any micro-benchmark tests, and 
> unfortunately the improvements are very minor, and far overshadowed by 
> the variability I get from my system.
>

I've created the attached test which tests the original code (Orig), your 
code (Two), and my suggestion of an int4buf (Three) and got the following 
surprising results:

jurka(at)tony:~/pg/jdbc/projects/perf/micro$ java -classpath . Tester Orig | 
sort -n
11335
11370
11468
11484
11487
jurka(at)tony:~/pg/jdbc/projects/perf/micro$ java -classpath . Tester Two | 
sort -n
12472
12476
12489
12492
12619
jurka(at)tony:~/pg/jdbc/projects/perf/micro$ java -classpath . Tester Three | 
sort -n
4259
4562
4564
4611
4689

This shows your code is actually slower than the original code, although I 
have no idea why that could be.  It shows the int4buf idea as a clear 
winner.  I'm a little suspicious of the whole test because of your numbers 
going up.  Could you take a look at this and possibly confirm the results? 
I'm not sure if windows has an equivalent to /dev/null, but I wanted to 
avoid any impact of disk io.

Kris Jurka

Attachment: Tester.java
Description: text/plain (1.8 KB)

In response to

Responses

pgsql-jdbc by date

Next:From: Stephen DenneDate: 2007-02-27 05:29:34
Subject: Re: Minor performance improvements
Previous:From: Stephen DenneDate: 2007-02-27 03:08:44
Subject: Re: Minor performance improvements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group