Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Java long 64-bit native?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java long 64-bit native?



"Michael Fogus" <email@hidden> wrote, but not in a single post:

>>I recommend a tightly focused benchmark, run on all the candidate
>>platforms.
>
>That would be wonderful, but not practical. Luckily I know beforehand
>that for my purposes 64-bitness will provide a speedup. Does 64-bitness
>help everyone? No.

I strongly recommend running your actual chess program on the machine you
are evaluating BEFORE purchasing it. If it emits some measurement numbers
meaningful to you, say, positions per second, all the better. The more you
know beforehand, the less likely you are to be surprised afterwards.

If there's an Apple Store in your area, you might be able to burn your app
onto a CD and take it in and try it out. Or maybe you can put it on a
website in JNLP form, and access it that way.

I also recommend running the program on an Athlon64 system. I haven't been
following Sun's releases closely, but I don't think their JITC generates
64-bit Athlon code. I could be wrong, however.


>>Perhaps "is a useful attribute in any program" is overstating the case a
>>tad.
>
>Whew! Glad I never said that then.

Accuracy compels me to quote your posting, marked by ## for your statement:

>From: "Michael Fogus" <email@hidden>
>Subject: Re: Java long 64-bit native?
>Date: Tue, 28 Oct 2003 09:29:57 -0500
>
>"Greg Guerin <email@hidden> wrote:
>>What difference would it make? Are you currently speed-limited by
>>long arithmetic?
>
>Yes. Everyone is speed-limited by long arithmetic in Java. Unless my
>JVM is 64-bit negative I have to wait at least two operations for long
>arithmetic. In my case, I have written a chess program that uses the
>long type to represent chess boards (64 squares, 64 bits... very
>convenient). ##Having to generate new positions very quickly is a useful
>attribute in any program.## If OSX allows for native 64-bit long types,
>then I would expect a very nice speedup on position generation. The
>difference for me is the choice between a G5, a Sun Blade, or an
>Athlon64 based system.


>Why perform multiple operations that are subsets of a problem when you can
>perform multiple unrelated operations? The latter will always provide a
>speedup.

As will parallel non-contending threads on multiple CPUs, when they are
present.

You may already be doing this, but I mention it because the dual-CPU Macs
really make a big difference if you can exploit both CPUs as much as
possible computationally. Not knowing much about chess position
evaluation, I would guess that position evaluation is relatively
independent for any given subtree.

The best way I can think of to discover NCPUS on Mac OS X is to exec() the
sysctl command:
sysctl -n hw.ncpu
and read its stdout stream for the resulting decimal number. See 'man
sysctl' for more info.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.