Say theoretically you just generate random numbers [using standard libraries] in as many threads as you can [bound by hardware]. How fast would C++ over Java?
no disk i/o, memory or gc. Just pure Math.random() calls across threads.
Depends on hardware, OS and many other factors... I think this a very hard question to answer, cause there is too many variables involved. Why don't you test it?
Test it. And Pay attention to the fact, that Java performance is not static above runtime. Because it can use a hot spot compiler, that compiles the hot spots after it detects them.
test both in the environment you will be deploying at.
精彩评论