Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Java in Panther?

Java in Panther?
Thread Tools
lacrymology
Fresh-Faced Recruit
Join Date: Jun 2003
Location: DC
Status: Offline
Reply With Quote
Oct 3, 2003, 01:02 PM
 
Does anyone know if the long datatype will be 64-bit native in Panther?

-m
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 4, 2003, 05:30 PM
 
Originally posted by lacrymology:
Does anyone know if the long datatype will be 64-bit native in Panther?
It won't.
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Oct 4, 2003, 08:13 PM
 
Originally posted by lacrymology:
Does anyone know if the long datatype will be 64-bit native in Panther?

-m
Nope, but the "long long" will be.

See here:

Subject : Apple on 64-bit-ness
To: [email protected]
From: Ernest Prabhakar < [email protected] >
Date: Wed, 10 Sep 2003 12:10:08 -0700
Hi all,

There seems to be a bit of confusion on this topic. The short answer is
* The PowerPC G5 processor is fully 64-bit
* Mac OS X supports many, but not all, services using 64-bit integers
* Currently, sizeof(void *) == 4

I realize that some people take a rigid position that 64-bit computing -> 64-bit OS -> sizeof(void *) == 8. Which may be understandable given their problem space, but reality - especially when dealing with mass-market personal computers, not speciality workstations - is a bit more complicated, and different people benefit from Mac OS X's level of 64-bit support in different ways.

A more official explanation is below. Please let me know if there's any confusion about this.
Sincerely,
Ernest Prabhakar
Product Manager, UNIX & Open Source
Apple
----------------------------------------
Mac OS X Jaguar (10.2.7 and later) features a redesigned kernel and updated system software math libraries specifically for the 64-bit PowerPC G5 processor. The updated kernel delivers the most substantial benefits of 64-bit computing by breaking through the 4GB physical memory barrier enabling the kernel to use all the RAM that can be added to the new Power Mac G5 (currently 8GB).

The key functions of the system math and vector libraries have been hand tuned to make maximum advantage of new and faster math functions that the 64-bit G5 is capable of. This is a great because unmodified applications that use the system math functions will get an automatic speed up when run on the G5. For example, the square root function is implemented as a software algorithm when run on a G3 or G4 but on a G5 when a square root calculation is requested the math library uses the super-fast hardware instruction that the G5 has.

This approach brings the maximum benefit of 64-bit processing to the desktop personal computer market and does so with full native-speed compatibility with existing 32-bit applications. Because the PowerPC instruction set was designed initially with 64-bit instructions in mind, this transition is a smooth and simple one for our developers and customers.

Apple has also supplied a new compiler, GCC version 3.3 which generates optimal code for the new G5 machine model. Importantly, this compiler produces code that executes efficiently on G5, G4 and G3 systems so a single Mac OS X application runs on each of our support processor architectures. This allows developers to build and qualify a single version of their applications for the 32-bit and 64-bit Mac systems.

Mac OS X Panther takes the same approach to the G5 as Jaguar but will be able to optimized additional math functions based on feedback from the developer community.

== References ===
Optimizing for the Power Mac G5
<http://developer.apple.com/performan...imization.html > ):
Technical Note TN2086: Tuning for the G5: A Practical Guide
<http://developer.apple.com/technotes/tn/tn2086.html >
Technical Note TN2087: PowerPC G5 Performance Primer
<http://developer.apple.com/technotes/tn/tn2087.html >
Technical Note TN2090: Driver Tuning on Panther or G5 (Of interest only if you have written a device driver)
<http://developer.apple.com/technotes/tn/tn2090.html >
Power Mac G5 Performance White Paper (PDF)
http://www.apple.com/powermac/pdf/Po..._WP_071503.pdf

== Default Sizes ===
sizeof (char) == 1
sizeof (short) == 2
sizeof (int) == 4
sizeof (long) == 4
sizeof (long long) == 8
sizeof (void *) == 4
sizeof (void (*)(void)) == 4
sizeof (float) == 4
sizeof (double) == 8
sizeof (long double) == 8* [may change in the future]
sizeof (size_t) == 4
sizeof (off_t) == 8

== G5-Related Flags for GCC ===
-mcpu=970
This allows the compiler to use instructions only available on the G5 (also known as 970) processor.

-mtune=970
This tells the compiler to tune code as optimally as it can for the G5. This flag can be safely used by itself on code that may run on processors other than the G5, because code compatibility is not changed.

-mpowerpc64
In combination with the above flags, this flag tells the compiler to enable the G5's native 64-bit long long support for greatly enhanced performance when working with long longs. At times, the -force_cpusubtype_ALL flag may also be needed.
_______________________________________________
scitech mailing list | [email protected]
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/scitech
Do not post admin requests to the list. They will be ignored.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Oct 4, 2003, 11:07 PM
 
Originally posted by Arkham_c:
Nope, but the "long long" will be.
I don't think Java has a long long type.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Oct 6, 2003, 10:02 AM
 
Originally posted by Chuckit:
I don't think Java has a long long type.
All data types in java are the same size on all platforms. That is necessary to ensure the "write-once, run anywhere" concept. On a 64-bit system it may use 64-bit registers underneath, but in the JVM layer, all longs will be the same size on all platforms.

Read here for java sizes:

http://www.javacamp.org/javaI/primitiveTypes.html

Bottom line: long is already 64-bit in java.
( Last edited by Arkham_c; Oct 6, 2003 at 10:13 AM. )
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
lacrymology  (op)
Fresh-Faced Recruit
Join Date: Jun 2003
Location: DC
Status: Offline
Reply With Quote
Oct 6, 2003, 10:59 AM
 
Originally posted by Arkham_c:
it may use 64-bit registers underneath
And this is my question. I realize that long is 64-bit on all platforms, but it is a virtual 64-bit datatype. If the long type is 64-bits underneath the hood, then it would be much faster than if it is not. This is my concern.

-m
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:33 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,