Friday, January 16, 2004

The many faces of GC

http://www.devx.com/Intel/Article/18160/0/page/1

Interesting to see that allocation of an object in .NET/Java is FASTER than in C/C++! Infact, since it's just incrementing of a pointer, it is probably as fast as a stack allocation. Deallocation, of course, is another story ;-)

I like how Java is not really associated with any particular GC scheme. This is good design - a proper componentized system.

The article talks about .NET only having one GC implementation. But that is not really true. The framework actually comes in two flavors... a workstation version and a server version. They have different goals in that the workstation version is more optimized for response-time whereas the server version is more concerned with throughput and also takes multiple processors into account. Similarly, the .NET Compact framework most probably has a different GC implementation customized to suit smaller memories. Also, different third party implementors like Mono are free to use whatever GC scheme they want, just like the different JVM implementations.

No comments: