Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

CL benchmarking

Name: Anonymous 2014-10-12 6:59

Is there a free benchmarking library for Common Lisp? Something like Haskell's Criterion, perhaps?

Name: Anonymous 2014-10-18 14:44

The easiest way is to get support from the implementation itself. But if that is not possible, a bunch of macros could be used to generate benchmark collection code. As the program runs, code should generate a list of function calls (or code positions) time stamped by when they were executed. Macros can do this by inserting calls that add data to a global object. Then once the data is collected, it can be organized in different ways.

>>11
1)
These both depend on the implementation. There is no theoretical reason that would cause a keyword function to perform slower than a regular one, but an implementation might create a dictionary and pass it to the function, which would be slower. I think that's how python does it?

2)
Depends on the implementation again. There is a look up to match the argument types to a method implementation. Performance depends on how that structure is implemented. This feature is more challenging than the method overriding in seeples and java since the dispatch can be done on all arguments rather than just the this instance. If the types of the arguments are known at compile time the CLOS dispatch can be optimized out and the called method inserted, in theory, but lisp is so dynamic I don't know if this can be done safely.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List