Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question



James Mooney wrote:
|Both comments, I greatly appreciate.
|
|I realize a question like the one I posed was too general and details
|are important.
|
|Example....
|The java app and the c app were both running on a webserver. the java
|app was executed within Tomcat.
|
|The c app was called from the shell via a php command.
|
|The time point is of course critical is you are sitting waiting for a
|page to load. I realize that there is some work being done when a
|servlet is run the first time, and subsequent calls are faster, but the
|time was clearly faster using the C app.

At this point, though, you're talking about whole systems, not simply "which one runs faster?". Now you've dragged in "how fast does Tomcat load your program?", "does Tomcat start a new JVM to run your program?", "how fast does PHP start a shell program?", "what else is going on at the time?", "what order are things happening?", and other such questions. For instance, if the java app runs first, it might be the first to load whatever library QuickTime lives in; the C program would then have it preloaded. If the order were switched, the C program might look slower.
Essentially, there are now just too many factors to be able to definitively assign a speed difference to any one of them. (Is a Mercedes faster than a VW? Yes. But if you add "during rush hour; the Mercedes driver is going to the dentist, and the VW driver to visit his girlfriend; the Mercedes driver isn't used to freeways, the VW driver has been doing the route for years", the VW may well get there sooner, because all the other factors work against the Mercedes.)

Glen Fisher
_______________________________________________
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.

References: 
 >Re: Newbie question (From: James Mooney <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.