measurements of ML programs

Fermin Reig reig@ropas.kaist.ac.kr
Wed, 11 Oct 2000 17:31:20 +0900 (KST)


[I am sending this to the smlnj mailing list, the caml developers
list, the MLton mailing list and to comp.lang.ml. Apologies if you see
it multiple times]

Hi,

I am considerin doing measurements of ML programs with the intention
of informing compiler writers. Here's a list of things that come to
mind as potentially useful.

Static counts

1. polymorphic vs monomorphic function definitions
2. number of free variables in functions
3. applications that take function arguments
4. applications that return a function as a result
5. calls to labels vs. calls to expressions
6. total applications
7. exceptions raised
8. how many comparisons are made in a pattern match (depth of decision tree)

Dynamic counts

 9. exception extents (number of dynamic calls from raise to handle)
10. calls to polymorphic/monomorphic functions
11. dynamic counts of 3-8 above

For example, the measurements could reveal that, say, 99% of functions
have < 2 free variables.

I'd be interested in knowing how relevant are the items in the list
above for implementors. Are there any other items that would guide
your implementation if you had a good estimate of how often they occur
in ML programs? Are any of the ones above not really interesting?

Thanks in advance,

Fermin