Use GraalVM → Slow (or rather, Java is fast enough. Than Go.) I wrote an article.
In the article, although I wrote about GraalVM, "I am aiming for a light footprint, quick startup, etc.", I mentioned only speed and did not mention footprint, so also about footprint I checked it.
MacBook Pro (Retina, 13-inch, Late 2012) Processor 2.9 GHz Intel Core i7 Memory 8 GB 1600 MHz DDR3
Use the / usr / bin / time -l command. The language version of each installed environment and the implementation to be measured are the same as the above.
language | maximum resident set size | Ratio with GraalVM as 1 (Truncate to one decimal place) |
---|---|---|
Node.js | 21,852,160 | 12 |
Java | 28,856,320 | 16 |
GraalVM | 1,798,144 | 1 |
Golang | 1,974,272 | 1 |
C#(dotnet) | 18,505,728 | 10 |
Python3 | 6,537,216 | 3 |
How, you can reduce the footprint to 1/16 of Java. (This time, I'm checking with a small command line tool that calculates the Fibonacci number, so I think that the situation is different for applications that I want to provide services with Kubernetes, such as Web applications, but there is also container overhead etc. Although not accurate, GraalVM has the potential to provide services with the same number of processes on Java's 1/16 infrastructure. It is wonderful! (And another surprise is that Python is excellent.)
Recommended Posts