[go-nuts] Re: The performance comparation of Golang and Java

2019-01-24 Thread Jimmy Wong
https://golang.org/doc/faq#Why_does_Go_perform_badly_on_benchmark_x On Friday, January 25, 2019 at 10:21:14 AM UTC+8, Topget wrote: > > I have tested several simple functions with Golang and Java. To my > surprise, Java sometimes is faster than Golang(especially in recursive > function and some

[go-nuts] Re: The performance comparation of Golang and Java

2019-01-24 Thread Dmitry Ponyatov
You should also take into account resource consumption, primarily RAM usage (and also CPU usage for runtime action itself: not linked with application logic). So you should normalize your benchmarks by RAM usage, and it will give you 100x of golang efficiency. Java critically requires 2G of RAM

[go-nuts] Re: The performance comparation of Golang and Java

2019-01-24 Thread Pat Farrell
On Thursday, January 24, 2019 at 9:21:14 PM UTC-5, Topget wrote: > > I have tested several simple functions with Golang and Java. To my > surprise, Java sometimes is faster than Golang(especially in recursive > function and some function in standard library such as math/rand.Rand). > What other

[go-nuts] Re: The performance comparation of Golang and Java

2019-01-28 Thread Topget
It will be better if someone could give me the example(s) to show the advantage of Golang (vs Java). Thanks. 在 2019年1月25日星期五 UTC+8上午10:21:14,Topget写道: > > I have tested several simple functions with Golang and Java. To my > surprise, Java sometimes is faster than Golang(especially in recursive

Re: [go-nuts] Re: The performance comparation of Golang and Java

2019-01-28 Thread Rodolfo
In my poor opnion: 1. Golang is a programming language that not need a virtual machine, It communicate directly with kernel, making use of all resource hardware better than Java. 2. Golang uses goroutines that consume only 2k of memory instead of 2MB(minimun) of threads used in Java. 3. With Gol