Java/C benchmark
There is a very good article that benchmarks a number of jvms including the blackdown jdk1.1.7+tya at http://www.javalobby.org/features/jpr One interesting point is that TYA is on various benchmarks 2-8 times slower than the Symantec jit included with Sun's java under Windows (which in turn is slower than the forthcoming hotspot). Since TYA is roughly the same speed as the 'sunwjit' jit supplied by sun for the linux java1.2, this means that Sun supplied linux a much slower jit than the one it supplies with Windows. Is this because they cannot legally supply the Windows jit? Where did this jit come from? - Somewhat related, some timings of two programs that I had available in both C and Java versions: The SPLINEFILL program rasterizes a closed spline contour and then uses a seed fill algorithm to color its interior. The java version is 1500 lines, not including some libraries. The seed fill is likely to be the inner loop but I did not verify this. The RANDOM program calls a custom random number generator a number of times and prints the last-generated number. This is a rather too simple (8-line) integer-heavy algorithm. In both cases I verified that the output was identical between the C and Java versions. The C timings on the SPLINEFILL were so short that they are probably not reliable, but maybe they give a rough guess about where we are. The RANDOM timings are encouraging, but it seems that this performance is only obtained for small routines with no floating point or objects. The machines involved are an Intel 166mmx running Linux 2.0.36 and an SGI (not running linux) using a 195mhz R10K. Both C,Java programs were compiled without optimization. The program times are "user" times in seconds as shown by the 'time' command. SPLINEFILL/intel gcc .23 jdk1.2prev1 .638 jdk117v1a/tya13 .621 jdk117v1a/tya11v4 .676 jdk117v1a/shujit0.2.10 .998 jdk117v1a(interp) 1.139 SPLINEFILL/sgi cc 0.086u+0.047s (not reliable) jdk115+jit .525 RANDOM/intel gcc 12.2 jdk1.2prev1 14.37 tya13 15.1 jdk117v1a interpreted 29.8 RANDOM/sgi cc 3.83 jdk115+jit 7.2 --- j.p.lewis [EMAIL PROTECTED] 012 345 6789 //www.idiom.com/~zilla -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
I want to help
I have read at http://www.infoworld.com/cgi-bin/displayNew.pl?/rcringe/rcringe.htm the following: "Having to rely on partners is also causing a delay with Netscape-AOL's Linux ports of its Directory Server and Mail Server products. The problem is in the free Java Runtime Engine (JRE) port, developed by Java-to-Linux proponents blackdown.org, which doesn't run under Red Hat 6. Without a working JRE, the development team is unable to continue porting the enterprise products to Linux, says a source close to the team." This is bullshit. What can I do to help in the porting effort besides test? Can I help in the port? -- "It is by caffeine alone I set my mind in motion, it is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning ..." --Carlos Nunes-Ueno -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Possible Java Bug ?
To extend my own question I think this is a bug since thre is no way for a programmer to intialize the enclsing instance variable. I think that Object should have a methos added. getEnclosingInstance() Then you coud do .. public void callFooBar(){ if( OuterClass.this == null ) { OuterClass.this = getEnclosingInstance(); } System.out.println(" Parent2 Foobar " +OuterClass.this); } My point being that the subclass should alwas be able to access its enclosing class. The probelm is thre is no way for a prgrammer to init the instance variable that I know of. This does not work either class Parent2 extends Parent1 { Parent2( OuterClass outer ) { outer.super(); } public void callFooBar(){ System.out.println(" Parent2 Foobar " +OuterClass.this); } } Anyway I think it is a bug. Michael Emmel wrote: > This generates the following output .. > > Parent2 Foobar null > > I understand why but it compiles and fails at runtime. > Thus if you subclass a class with and inner class any method used is the > parents consturctor cannont > acces the Outer class. > > Of course I may be doing something stupid but I know the instance.super > stuff and this is the referse case. > It seems a bit pathalogical and also it compiles fine even though it > will never run. > The null pointer excetion if you access OuterClass.this is not exactly > helpful either. > > Any thoughts ?? > > Mike > > class Parent1 { > > public Parent1(){ > callFooBar(); > } > > public void callFooBar(){ > System.out.println(" Parent1 Foobar"); > } > > } > > public class OuterClass { > > class Parent2 extends Parent1 { > > public void callFooBar(){ > System.out.println(" Parent2 Foobar " +OuterClass.this); > } > > } > > public OuterClass() { > > Parent2 p2 = new Parent2(); > } > > public static void main( String[] args ) { > OuterClass test1 = new OuterClass(); > > } > > } > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Sun's HotSpot for win32 available for download !
Hello, I have downloaded two hours ago the HotSpot for win32 (Win95/98/NT). Tried it. It works. Don't know how fast it is, maybe someone could make some real tests with it. Nothing exciting to see ... I'm just waiting for Linux jdk 1.2 final release instead :-) Best regards, -- Constantin Teodorescu FLEX Consulting Braila, ROMANIA -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: javax.swing.preview not found
At 03:12 a.m. 01/05/99 -0600, you wrote: >Keep the javax.swing.* line, only remove javax.swing.preview. > >--Jeff Ok, thankyou, I understand, my problem is that I dont have the javax package How could I find it, I´m using Linux 5.2 whith JDK 1.1.7 and there is not any "javax" in the crs.zip (?) directory. If the javax package is not too long (<1mb *.tar.gz) could some budy sendmee please, I have not a fluently Internet connection, thankyou. Bernardo Paz . . . -- Dr. Bernardo Paz Betancourt TROPANDES PROJECT http://www.megalink.com/tropandes Casilla 415 LP Tel 591 (2) 41.18.34 La Paz - Bolivia -- **Do you think that Win98 is 100%** sure to share information? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: javax.swing.preview not found
> At 03:12 a.m. 01/05/99 -0600, you wrote: > >Keep the javax.swing.* line, only remove javax.swing.preview. > > > >--Jeff > > Ok, thankyou, I understand, my problem is that I dont have the javax> package > How could I find it, I´m using Linux 5.2 whith JDK 1.1.7 and there is > not any "javax" in the crs.zip (?) directory. Pick it up from Sun. You can get the current released Swing for JDK1.1 at http://java.sun.com/products/jfc/download.html , or the Beta version for the next release at http://developer.java.sun.com/developer/earlyAccess/jfc . Nathan - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE:
Hi, 1)Could anyone tell me how I could get the javax.swing package. 2)Also does anyone know where i could get a small program which retrieves email from a specific POP 3 account. Thanks Farhan -Original Message- From: Jonathan Knudsen [mailto:[EMAIL PROTECTED]] Sent: 29 April 1999 22:14 To: Farhan Killedar Cc: Allen Noren; [EMAIL PROTECTED] Subject: Re: Fonts with Java Hi Farhan, JDK 1.2 (Java 2) comes with fonts that include Arabic glyphs (the Lucida Sans fonts). At the end of this email, there's an example that puts some Arabic text in a JTextArea. I hope this helps. I'm not sure if JTextArea correctly handles the editing of right-to-left text, but the example demonstrates that you can at least show it. Jonathan - import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ArabicExample { public static void main(String[] args) { JFrame f = new JFrame("ArabicExample v1.0"); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { System.exit(0); } }); f.setSize(200, 200); f.setLocation(200, 200); JTextField field = new JTextField(10); field.setFont(new Font("Lucida Sans Regular", Font.PLAIN, 12)); field.setText("\u062e\u0644\u0639"); f.getContentPane().setLayout(new FlowLayout()); f.getContentPane().add(field); f.setVisible(true); } } - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Possible Java Bug ?
I'm not 100% certain about this, but I think you might be bending the JLS a little bit in what you're trying to do I remember there being a _recommended_ but not _required_ notation recommended for compilers in the inner class specs... something like this$1 to access the enclosing object, and this$2 to access it's enclosing object, etc... (I may have them numbered backwards... I do remember at the time I read it that this seemed a bass-akwards way of numbering.) You might want to do some introspection or disassembly of classes/innerclasses your compiler generates and see what kinds of private-static-final fields it creates under the covers for you. I also seem to remember that super() isn't a real method... just syntax to tell the compiler to replace the standard call to superclass's null arg ctor with a call to a specific argument list ctor in your _immediate_superclass_. -=Chris At 10:43 AM 5/1/99 -0400, Michael Emmel wrote: > >To extend my own question I think this is a bug since thre is no way >for a programmer to intialize the enclsing instance variable. >I think that Object should have a methos added. [snip] !NEW!-=> <*> cabbey at home dot net http://members.home.net/cabbey/ <*> "What can Microsoft do? They certainly can't program around us." - Linus -BEGIN GEEK CODE BLOCK- Version:3.12 http://www.geekcode.com GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y? --END GEEK CODE BLOCK-- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Sun's HotSpot for win32 available for download !
In article <[EMAIL PROTECTED]> you write: >Tried it. It works. Don't know how fast it is, maybe someone could make >some real tests with it. > On the JPython list, an adapted version of PyStone, a simple benchmark bundled with Python, showed a dramatic increase up to the same level as C-based Python. The adaption was to let the test run longer - apparently, Hotspot is for long-living server-side processes and needs some time to get to speed. All in all, interesting stuff which I hope will be available on Linux sometime (that, or the IBM JDK...) -- Cees de Groot http://www.cdegroot.com <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Java/C benchmark
Thanks for pointing out the article, made for interesting reading... but I'm afraid I have to say your followup comparisons are unfair... >One interesting point is that TYA is on various benchmarks >2-8 times slower than the Symantec jit included with Sun's java hmmm... one is developed by a large international company over the course of a couple years, by an estimated few dozen engineers and costs money (even if _you_ got it for free, SUN paid Symantic for it); the other is developed by a small handfull of developers in spare time as OSS and costs nothing. The one with jdk116+ from Sun is the "little sister" of the commercial JITC Symantic sells -- reported to be the best in the industry. Also look at the interpreted only numbers and you'll see that the win32 jvm is a tad faster than the Linux jvm to begin with. That blackdown/TYA even _made_ the short list to be compared is a tribute to the great work by everyone on the two teams! This was mostly a Win32 article, with a pair of Linux JVMs thrown in, probably because of Tower's touted performance. Note the absence of: OS/2, OS/400, OS/390, AIX, HP/UX, SCO, Reliant, Solaris, Be and Mac in the platform catagory and Kaffe and (whatever that other one is) in the Linux JVM catagory, and the projects such as Cygnus' GCJ or IBM's High-Performance compiler for Java in the "let's bend the JVM concept as far as we can in the name of performance" catagory (that's where I put TowerJ). Also missing were the other linux jits. >under Windows (which in turn is slower than the forthcoming hotspot). hotspot isn't a JIT, it's a whole new breed of VM... >Since TYA is roughly the same speed as the 'sunwjit' >jit supplied by sun for the linux java1.2, this means that Sun supplied >linux a much slower jit than the one it supplies with Windows. HUH?! I don't understand this logic... are you comparing 1.1 to 1.2??? or symantic with sunwjit??? either way I gotta say "no fair" >Is this because they cannot legally supply the Windows jit? Where >did this jit come from? Which windows jit? the Symantic jit they shipped with 116+ or the "sunwjit" they ship with 1.2? the first one they licensed binaries from Symantic, originally in the "preformance pack" they had for 115 (or maybe it was 114) the second I'm told was developed in house [timings snipped] very interesting numbers... but any benchmark as short as those really aren't very good if you only want to look at the java time... you also captured program load, kernel overhead, etc... which in that short of time is probably a substantial percentage. a good way to avoid that is to capture System.currentTimeMillis() before and after a "test" and subtract... an even better mark is to loop the test a few hundred times and divide the differences by that mark... for example, if I wanted to benchmark the performance of my render() method... long before, after; static final int loops = 500; //incr for quicker methods for (int lcv=10;lcv>0;--lcv) { render(); } //warmed-up the jit, etc... System.gc(); System.out.println("warmed up"); before = System.currentTimeMillis(); for (int lcv=loops;lcv>0;--lcv) { render(); // System.out.println("-=- "+lcv+" -=-"); //use only when testing for gc! } after = System.currentTimeMillis(); System.out.println("avg:"+( (after-before)/loops )+"ms."); then run with -verbosegc and try to adjust -ms and -mx (both the same) to a value so that you minimize GC, without paging... you can use fewer loops at that point... from the times you posted for splinefill, I'd use about 10,000 loops; and for random about 400. -=Chris p.s. (_way_ off-topic) /pix/sunset640sig.jpg is gorgeous, as is the background of /pix/cvg640.jpg (not sure what the object is though...) !NEW!-=> <*> cabbey at home dot net http://members.home.net/cabbey/ <*> "What can Microsoft do? They certainly can't program around us." - Linus -BEGIN GEEK CODE BLOCK- Version:3.12 http://www.geekcode.com GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y? --END GEEK CODE BLOCK-- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]