
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've come up with three different methods of approach to solve the same problem in haskell. I would like to compare the three in terms of reductions, memory usage, and overall big O complexity. What's the quickest way to gather these stats? I usually use the ghc compiler, but also have hugs installed. The big O complexity probably has to be done by hand, but maybe there's a tool out there to do it automagically. Shawn - -- You're in a maze of twisty little statements, all alike. Public Key available from http://www.garbett.org/public-key -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9WU0BDtpPjAQxZ6ARAkTKAJ9qixYy5MT5QGyJ/95NGLNgVTECCQCfVVVV GHELk++jO8XzaWUbp/mb9Og= =MYjn -----END PGP SIGNATURE-----

"Shawn P. Garbett"
I've come up with three different methods of approach to solve the same problem in haskell. I would like to compare the three in terms of reductions, memory usage, and overall big O complexity.
What's the quickest way to gather these stats?
I don't know about quickest, but if you haven't yet tried GHC's profiling, this might be a good time to do so. Build your project, using e.g. ghc --make -prof -auto-all ... (I like to add '-hisuf p.hi -osuf p.o' in order to keep files apart from non-profiling builds, since linking with both kinds will crash your program) Then run it with ./a.out (or whatever) +RTS -p -RTS and look at the resulting file a.out.prof. Replace -p with -h to do heap profiling. Have a look at the online GHC documentation for all the details, it's pretty comprehensive and readable, IMO. -kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (2)
-
ketil@ii.uib.no
-
Shawn P. Garbett