On Thu, Jan 24, 2019 at 6:21 PM Topget <[email protected]> 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). I wonder why. Here > is some code I used for test and the result.
Because goroutines start with a small stack that grows as needed, deeply recursive functions will tend to have somewhat worse behavior the first time they are called. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
