I’m currently working to see if I can get profiling going...
At the moment, Amacx loads arc.arc unpleasantly slowly. And I don’t
even have all of arc.arc included yet.
I imagine it’s probably because the compiler is slow. (What else could
it be?)
And I imagine there’s a good chance the compiler is slow because as the
compiler recursively works its way down into forms being compiled, I
functionally extend the compilation context in a simplistic way:
(def functional-extend (g nk nv)
(fn (k)
(if (is k nk) nv (g k))))
But it would be nice to be able to measure it, instead of just guessing.
I hope I can use the Racket profiler, if I can propagate function names
and/or function source locations from Arc to Racket.
i.e. the profiler knows that functions are being called, but has no way
to identify them because all such identifying information has been lost
by the time Arc code (e.g. implementing the compiler) has been compiled
to Racket.
Today I ran into a weird issue. I was running the Racket profiler in
DrRacket, and it worked at first, but then started to hang. So I closed
DrRacket and restarted it, deleted all my `compiled` directories,
reverted my source code back to an earlier version… and it still hung.
So I don’t know why it worked at first or why it stopped working.
But it turns out the profiler works well from the command line, so I’m
doing that instead.