Re: [pool] replacing numeric/byte constants with Java5 enums

2011-04-26 Thread Simone Tripodi
Hi Phil, it's ok, the roadmap makes a lot of sense!!! Simo http://people.apache.org/~simonetripodi/ http://www.99soft.org/ On Mon, Apr 25, 2011 at 11:43 PM, Phil Steitz wrote: > On 4/25/11 1:40 PM, Simone Tripodi wrote: >> Hi all, >> in the first pool2 attempt we agreed on replacing numeric/by

Re: [pool] replacing numeric/byte constants with Java5 enums

2011-04-25 Thread Stephen Williams
Probably wrapped integers would also do badly. The issue seemed to be that all object creates and method calls were expensive, far more expensive than a final static int or array access. The JDK magically transforms the literal use of objects and methods into much faster, but equivalent code.

Re: [pool] replacing numeric/byte constants with Java5 enums

2011-04-25 Thread Adrian Crum
It would be interesting to see how an int wrapper would perform on Android. -Adrian On 4/25/2011 2:21 PM, Stephen Williams wrote: Note that, as of Android 2.2's Dalvik at least, that Java5 enums are much much slower than using constants. For anything that gets used frequently, and that might

Re: [pool] replacing numeric/byte constants with Java5 enums

2011-04-25 Thread Phil Steitz
On 4/25/11 1:40 PM, Simone Tripodi wrote: > Hi all, > in the first pool2 attempt we agreed on replacing numeric/byte > constants with Java5 enums, do we agree on doing it also for first > pool2 release? > Thanks in advance! > Simo Let's hold for now so we can get DBCP working with just the base cha

Re: [pool] replacing numeric/byte constants with Java5 enums

2011-04-25 Thread Stephen Williams
Note that, as of Android 2.2's Dalvik at least, that Java5 enums are much much slower than using constants. For anything that gets used frequently, and that might be used on Android, that is a problem. I wrote and optimized a SAX and DOM parser on Android. While the JDK will optimize out most

Re: [pool] replacing numeric/byte constants with Java5 enums

2011-04-25 Thread Gary Gregory
That would fall under the Java 5 umbrella, like generics, so that's OK with me for an ASAP pool2 release. Gary On Mon, Apr 25, 2011 at 4:40 PM, Simone Tripodi wrote: > Hi all, > in the first pool2 attempt we agreed on replacing numeric/byte > constants with Java5 enums, do we agree on doing it a

[pool] replacing numeric/byte constants with Java5 enums

2011-04-25 Thread Simone Tripodi
Hi all, in the first pool2 attempt we agreed on replacing numeric/byte constants with Java5 enums, do we agree on doing it also for first pool2 release? Thanks in advance! Simo http://people.apache.org/~simonetripodi/ http://www.99soft.org/