6 ms·
64-bit pointers isn't really an optimistic assumption, it's just the normal pointer size on 64-bit systems.
by iainmerrick 3y ago
64-bit pointers isn't really an optimistic assumption, it's just the normal pointer size on 64-bit systems.
- Bjartr 3y agoIt was optimistic because Java came out long before 64 bit systems were common.
- formerly_proven 3y agoCommon in desktops, yes, but Sun being a UNIX workstation vendor they switched in the 90s.
- oefrha 3y agoWell, the 3 billion devices (r) Java ran on certainly weren’t Sun workstations.
- iainmerrick 3y agoOptimistic to represent object references with native pointers? C and C++ usually do that too.
- prpl 3y agoUltraSPARC says hello
- zactato 3y agoThe DEC Alpha was a 64 bit CPU architecture that came out in 1992. Java support it from Java 1.0 to ~ Java 3 Interestingly, I can't find any information on Google about this, but ChatGPT does support this. Unfortunately all the primary sources it gave me are for docs that no longer exist on the web. The Wayback machine was no help. The old web is dead :(
- cesarb 3y ago> Interestingly, I can't find any information on Google about this, but ChatGPT does support this. Unfortunately all the primary sources it gave me are for docs that no longer exist on the web. Or perhaps that never existed. It's well known that ChatGPT often hallucinates non-existing references (see for instance the discussion at https://news.ycombinator.com/item?id=33841672 https://news.ycombinator.com/item?id=33841672).
- fweimer 3y agoApparently, there was a Java port for Windows NT running on the DEC Alpha: https://archive.org/details/jdk-v1-alpha_nt https://archive.org/details/jdk-v1-alpha_nt It's unclear whether it's actually a 64-bit build. Did Windows even have a 64-bit userspace on Alpha, or was it all ILP32? Anyway, it's not really possible to implement the Java memory model on Alpha: https://www.cs.umd.edu/~pugh/java/memoryModel/AlphaReordering.html https://www.cs.umd.edu/~pugh/java/memoryModel/AlphaReorderin... So it's not really a natural target for Java code.
- twoodfin 3y agoWikipedia matches my recollection: Windows NT was actually ported to 64-bit using Alpha workstations, so there were probably some pre-release versions floating around. But by the time 64-bit Windows was ready, Alpha was a dying platform and the original release was only for the 64-bit platform with a real future, Itanium.
- iainmerrick 3y agothe 64-bit platform with a real future, Itanium Ouch!
- zactato 3y agoYeah I also remember this. My Dad was at DEC/Compaq at the time and had access to the Windows NT prerelease. He was explaining to me why it was cool, but as an 8 year old I didn't really get it.
- marginalia_nu 3y agoRight, but in the mid '90s when Java was designed, 64 bit machines were basically an exotic architecture and its practicalities weren't well understood, which is quite clear when CompressedOOPs is basically the sane default. The weird inconsistency is apparent as you fairly frequently stub your toe on the 2 billion size limits of Java arrays, which is an area where 64 bit pointers would have made much more size than in object references.
- znpy 3y ago> Right, but in the mid '90s when Java was designed, 64 bit machines were basically an exotic architecture No they weren't, not in the enterprise market. At home? sure. SUN Microsystems released the Sparc v9 architecture in 1993. SUN also made the Java language and JVM.
- krzyk 3y agoWasn't java targeted at embedded? AFAIR at some point it was marketed that it will be in every washing machine, fridge. There a was HotJava browser, weren't servers just a small part of its target?
- jbverschoor 3y ago"Write Once, Run Everywhere" was their slogan. There's Java Card for smartcards yes. There was also Java Micro Edition (j2me) for phones.
- fweimer 3y agoMost binaries were still 32-bit for performance reason, and I don't think that Java 1.2 had a 64-bit port yet, not even on Solaris/SPARC. The situation that an x86-64 build is faster than an i386 build of most applications (exception extremely pointer-heavy ones) is a bit of an exception because x86-64 added additional registers and uses a register-based calling convention everywhere. That happens to counteract the overhead of 64-bit pointers in most cases. Other 64-bit architectures with 32-bit userspace compatibility kept using 32-bit userspace for quite some time.