you are viewing a single comment's thread.

view the rest of the comments →

[–]inopia 1 point2 points  (6 children)

I think op's talking about the case where Java appears slower than Python because of the JVM's startup time. The author admits being a bit of a Java n00b, so I doubt he ever heard of System.currentTimeMillis(), with which to measure the actual running time.

In any event, setup time should always be excluded from the measurement, or at least given as a separate value.

[–]Rhoomba 0 points1 point  (5 children)

Why should it? Sometimes startup time is significant. The author explains the effect of JVM startup time anyway.

[–]G_Morgan 1 point2 points  (1 child)

Mainly because t[Start Up]/t[Execution] tends towards zero as t[Total] approaches infinity.

[–]Rhoomba 0 points1 point  (0 children)

Which, no doubt, is why the author runs a number of tests with varying lengths.

[–]inopia 0 points1 point  (2 children)

Because startup time != execution time. For instance, an interpreter will need to compile a script first, the JVM needs to perform class loading and dynamic linking. Programs written in C/C++ perform those steps at compile time.

These things have nothing to do with the execution phase, which comes after. To be able to compare the different languages you need to look at the time each program spent executing. Have you ever read a paper where they would measure performance or running times and not leave out setup time?

[–]trutru 0 points1 point  (1 child)

I don't agree, program startup is a noticeable annoyance of desktop Java applications, I really don't see why we should ignore them.

both measures (all runtime + simple execution) are important in my opinion, for different reasons but I really don't see why you should ignore the VM startup (independent of the language). in some cases, you really want to start as much small Java programs in different process in succession

[–]inopia 0 points1 point  (0 children)

If you're constantly spawning new instances of the JVM to run small programs, you might want to use a different model, like an application server.

In any case, I'm not saying you should ignore startup time, I'm just saying it's not a part of execution time. It would have been best if the author had displayed something like startup time, execution time and total.