[racket] Everything type-checks; on to benchmarking and optimization

From: Bloch Stephen (bloch at adelphi.edu)
Date: Sun Feb 16 23:43:30 EST 2014

I'm teaching a junior-level algorithms course, and assigned my students to implement three different matrix-multiplication algorithms and benchmark them.  So I had to do it myself too :-)

In untyped Racket, most of the runs took seconds or minutes, but others (only twice as large, so I would expect roughly 8 times the run-time) have been running for days without result.  So I decided to try porting everything to TR, to see whether that saved any significant (presumably constant-factor) time.  Once I'd gotten everything to type-check in TR, I revised the untyped version to resemble the typed version as closely as possible.

The results so far: the typed version is taking 20-30 times longer than the untyped version.  Huh?

I've installed the optimization coach, and am looking through its recommendations.  For the untyped version, it suggested a couple of inlinings.  For the typed version, nothing.

Stephen Bloch
sbloch at adelphi.edu
GPG  key at http://adelphi.edu/sbloch/sbloch.pubkey.asc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140216/92c9350e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 495 bytes
Desc: This is a digitally signed message part
URL: <http://lists.racket-lang.org/users/archive/attachments/20140216/92c9350e/attachment.sig>

Posted on the users mailing list.