Re: PostgreSQL 8.0 Feature List?

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: pg(at)fastcrypt(dot)com
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL 8.0 Feature List?
Date: 2004-08-16 14:13:02
Message-ID: thhal-0sVr8AcFYWQIv8rD0uMRUS5tb7PUVlc@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dave Cramer wrote:

> Richard,
>
> Actually, I think you will find that current implementations of java
> will actually take
>
> String foo = "Hello " + "World" and rewrite it into
>
> String foo = new StringBuffer("Hello").append("World").toString()
>
> But your point is still valid.
>
Oh c'mon. Give the current Java compilers some more credit.

Most Java compilers, will optimize string concatenation whenever
possible. The examples given here falls into the category of simple
constant evaluation. The above example will be optimizied into:

String foo = "Hello World".

The same is true for Richards example.

Try it yourself. Compile a simple program "Hello " + "World" in it, then
use jad to decompile, or if you don't have it available, use strings(1)
on the resulting class file.

Regards,

Thomas Hallgren

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2004-08-16 14:15:39 Re: postgres in freebsd jail
Previous Message Bill Moran 2004-08-16 13:59:36 Re: postgres in freebsd jail