Name: Anonymous 2014-10-12 6:59
Is there a free benchmarking library for Common Lisp? Something like Haskell's Criterion, perhaps?
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.