4 ms·
How do you expect Go to be faster than Java? Off the top of my head here's three reasons why I expect Go to be equal or slower in the general case: * the type
by awj 13y ago
How do you expect Go to be faster than Java? Off the top of my head here's three reasons why I expect Go to be equal or slower in the general case:
* the type system doesn't provide any more information to optimize against
* lack of generics means you're going to incur runtime type checks to unpack data out of containers
* internal pointers force a choice between ignoring advanced garbage collection (which usually involves moving data in memory), making all object accesses a double pointer dereference (to allow moving), and forcing the user to specify at allocation time if the object should be eligible for movement. All of these choices suck.
Personally, I don't expect Go to ever be "faster than Java". Maybe (hopefully!) I'm wrong, but these are big roadblocks.