Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] optimum class initializer functions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-04-02 (21:46)
From: james woodyatt <jhw@w...>
Subject: [Caml-list] optimum class initializer functions?

I've noticed that using a class where a module would suffice produces 
substantially larger native code objects.

I haven't looked closely enough to know all the details, but it looks 
like object creation costs about the same as record creation.  All the 
extra space appears to be in the class initializer functions and the 
static data they require.  Seems like a fair trade, but I still have 

	1) Is there any room for improvement in the space requirements of
	   class implementations generated by the compilers?

	2) Are there any idioms to avoid that greatly increase the space
	   requirements of classes without offering any benefit in time or
	   code maintenance?

If no ones wants to answer these question, then I suppose I will get 
around to investigating the issue myself after awhile.

j h woodyatt <>

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: