-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 5/21/2009 1:57 PM, David kerber wrote:
Interesting. From that description, depending on how sparse is
sparse, there's probably a good chance I'm getting a tableswitch.
If you find that a tableswitch is /not/ being generated, you could
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Subject: Re: Performance: switch vs if ... else if
If you find that a tableswitch is /not/ being generated,
The tableswitch is being generated for the enum switch (rtFields), but not the
char switch. However, using the enum
Caldarale, Charles R wrote:
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Subject: Re: Performance: switch vs if ... else if
If you find that a tableswitch is /not/ being generated,
The tableswitch is being generated for the enum switch (rtFields), but not the
char
From: David kerber [mailto:dcker...@verizon.net]
As a
result, right now I don't have any way of generating enough
load to find
a bottleneck in the overall servlet (which is a very good thing!!).
That's a win. Congratulations!
- Peter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 5/19/2009 3:04 PM, David kerber wrote:
I have a section of code in a frequently-called (~3.5 million times
per day) servlet where I had to process based on a parameter that
could take one of 6 different single-character string values. I
Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 5/19/2009 3:04 PM, David kerber wrote:
I have a section of code in a frequently-called (~3.5 million times
per day) servlet where I had to process based on a parameter that
could take one of 6 different
From: David kerber [mailto:dcker...@verizon.net]
Subject: Re: Performance: switch vs if ... else if
Can you point me to a byte code interpreter so I could look at this?
The javap tool in the JDK will display the byte codes. (I use it a lot.) If
you want, go ahead and send me the class
21:51 schreef David kerber :
Caldarale, Charles R wrote:
From: David kerber [mailto:dcker...@verizon.net]
Subject: Performance: switch vs if ... else if
I had to process based on a parameter that could take
one of 6 different single-character string values. I
had been using an if .. else
Ronald Klop wrote:
As with the tips about usage of char in the switch you can also test
using a char in the if ... else.
if (myChr.length() != 1) {
throw new RuntimeException(invalid length);
}
char ch = myChr.charAt(0);
if (ch == 'c') {
p += 1;
} else if (ch == 'r') {
p += 2;
} ...
This isn't directly related to tomcat, but does relate to the
performance testing people have done over the last couple of days.
I have a section of code in a frequently-called (~3.5 million times per
day) servlet where I had to process based on a parameter that could take
one of 6 different
From: David kerber [mailto:dcker...@verizon.net]
Subject: Performance: switch vs if ... else if
I had to process based on a parameter that could take
one of 6 different single-character string values. I
had been using an if .. else if construct.
Interesting numbers. Can you show us
Caldarale, Charles R wrote:
From: David kerber [mailto:dcker...@verizon.net]
Subject: Performance: switch vs if ... else if
I had to process based on a parameter that could take
one of 6 different single-character string values. I
had been using an if .. else if construct.
Interesting
If you're only doing a single character, you would probably get better
performance with:
switch (sString.char(0)) {
case 'A':
case 'B':
case 'C':
}
David kerber wrote:
Caldarale, Charles R wrote:
From: David kerber [mailto:dcker...@verizon.net]
Subject: Performance: switch vs
2009/5/19 David kerber dcker...@verizon.net:
Caldarale, Charles R wrote:
From: David kerber [mailto:dcker...@verizon.net]
Subject: Performance: switch vs if ... else if
I had to process based on a parameter that could take
one of 6 different single-character string values. I
had been
Konstantin Kolinko wrote:
2009/5/19 David kerber dcker...@verizon.net:
Caldarale, Charles R wrote:
From: David kerber [mailto:dcker...@verizon.net]
Subject: Performance: switch vs if ... else if
I had to process based on a parameter that could take
one of 6 different single-character
Konstantin Kolinko wrote:
...
1. If you are doing tests with the classic VM, allow it some time to warmup and
compile your code. That is, run the same test first with a smaller count of
iterations.
Server VM precompiles code before using it, while Classic one compiles
heavily used parts of
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Subject: Re: Performance: switch vs if ... else if
Server VM precompiles code before using it, while Classic one compiles
heavily used parts of code on-the-fly.
Your terminology is incorrect, as are your descriptions of when code
2009/5/20 Caldarale, Charles R chuck.caldar...@unisys.com:
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Subject: Re: Performance: switch vs if ... else if
Server VM precompiles code before using it, while Classic one compiles
heavily used parts of code on-the-fly.
Your
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Subject: Re: Performance: switch vs if ... else if
Regarding Server VM: I accept it as my mistake. I know, that Client
VM is optimized for faster startup (and, well, it is written in the
FAQ [1]), but I do not know why I thought
19 matches
Mail list logo