(inline + specialize) / 2
Marcin 'Qrczak' Kowalczyk
14 Apr 2001 13:02:48 GMT
I would like to say: remember unfolding of this overloaded function
or instance, try to specialize it for all types it will be used on,
but don't inline every occurrence; preferably keep at most one body
for each type, at least considering one module.
IOW I am saying that the given function is small enough to export
and instantiate its unfolding, especially as it would benefit from
inlining overloaded operations into it, but it's too large to inline
at every usage, and I don't want to specify all types it will be
instantiated on in advance. Example: equality and comparison of arrays.
If it's a good idea, it would be great if somebody implemented it.
BTW, I've just added support for INLINE instance pragmas; will
commit it soon. It ensures that the instance dictionary function is
inlined. This is important if some methods are specialized or inlined
- otherwise we get just applications of an out of line dictionary
__("< Marcin Kowalczyk * email@example.com http://qrczak.ids.net.pl/
^^ SYGNATURA ZASTĘPCZA