> 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
---
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: 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. Howeve
-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 coul
> 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
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 singl
-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.
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;
} ...
Shou
final char ch = myChr.charAt(0);
p += VALUES[ch - OFFSET];
}
Ronald.
Op dinsdag, 19 mei 2009 21:51 schreef David kerber :>
Caldarale, Charles R wrote:
>> From: David kerber [mailto:dcker...@verizon.net]
>> Subject: Performance: switch vs if ... else if
>>
>> I
> 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 [
2009/5/20 Caldarale, Charles R :
>> 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-th
> 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 descriptio
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 code
Konstantin Kolinko wrote:
2009/5/19 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
2009/5/19 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
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]
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
> 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
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 s
19 matches
Mail list logo