Flex vs Java Speed

I was having a discussion about how Flash 9 is much faster than pervious versions. The discussion shifted to how it does it compare against Java, so I decided to create a little test to find out. I created an action script class and java class that quick sorts a million numbers. The Java version took 2.4 seconds, the Flash/Flex version took 45 seconds. I decided the comparison wasn't quite fair since I was using primitives in Java and Flash numbers are really immutable objects, so I changed the Java version to use the Integer class instead of ints. That increased the Java running time to 5.1 seconds. Of course this is pure calculation and moving data around in memory, which isn't Flash's focus, but I thought it was interesting to know. I need to recompile this in Flash 8 and see what kind of performance difference the new VM makes.

Related Blog Entries

Comments
OK, but you do not mention how much time you wait for the application to start. I usually wait around 10 sec. for the JVM to start the java apps. Even applets

Regards,
Daniel
<a href="http://runcompetition.com">http://runcompetition.com</a>
# Posted By Daniel | 10/9/07 10:30 AM
I had run java on my web for database.
http://paperbag.c1c1.com
# Posted By richard | 11/6/07 3:52 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.004.