On Thu, Jan 10, 2002 at 06:12:57PM +0100, Niklas Mehner wrote:
> Hi!
>
> I just did some profiling on freenet startup time and got the following
> results:
> (using java -server -Xbatch -Xmx200M -Xrunhprof:cpu=times,heap=sites
> Freenet.node.Node)
When you profile using cpu=times, on Sun's JVM especially, Object.wait
tends to show up as a major contributor, when in fact it has nothing to do
with the actual program. So you can probably safely ignore traces 1937
and 2161.
Good stuff though.
> Since I did not want to optimize wait() or sleep() I looked at _b() a
> small patch.
> This improves the _b() performance by about 25% (should be about 5-10%
> for the whole startup process).
> I have attached a test case and the patch. So if you like it, feel free
> to check it in.
My only comment is that the code in TwofishAlgorithm was designed to be
inlined by the JVM at Runtime, so yes, it should improve startup
performance considerably, but it should actually worsen performance over
time. The reason is that after inlining, this becomes a JVM tableswitch
operation followed by a constant shift and bitmask. Further optimization
may even get rid of the tableswitch depending on JVM.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20020110/ec219be6/attachment.pgp>