Live data from Hacker News

How fast does Java compile?

mill-build.org

1–10 of 76 posts

Re: How fast does Java compile?

#5
We slow our build down by having a dozen 'tools'-projects with a handful of classes each in a straight dependency-line above our main project that contains 99% of the code. This easily increases our compile time from a few seconds to several minutes. With a bonus chance to cause an infinite IDE workspace build loop.

Re: How fast does Java compile?

#7

I thought java was tokenized, not compiled. That's why you need their runtime environment isn't it?

It is compiled to Java byte code. The JVM runs the byte code.

Tokenization [1] is the process of splitting text into components called tokens. It's usually the first stage of parsing.

[1]: https://en.wikipedia.org/wiki/Lexical_analysis#Tokenization

Re: How fast does Java compile?

#8

How fast does Golang compile? https://www.octobench.com/

Huh, so for anyone interested but did not have the time to do the comparison of the two links of OP and parent post:

* java (on a cold jvm): 18.000-32.000 line per second on a single core

* java (on a hot jvm): 102.000-115.000 line per second on a single core

* golang: 28.000 line per second on 12 core

Re: How fast does Java compile?

#9

I thought java was tokenized, not compiled. That's why you need their runtime environment isn't it?

Java is compiled down to bytecode and there is a bunch that happens in the compiler to make things fast ahead of the JIT.
Post reply on HN