-
Notifications
You must be signed in to change notification settings - Fork 6
Benchmark behaviour on defined class is slow. #3
Comments
it seems normal-plus is running w/o boxing, right? |
Correct! Fixed in bon@76d1eb6 Processor cycles are now
|
phew. |
I just tested your version. On my machine, the result is still in favor of the inlined version.
What is this difference? In your result I-g-function is performing better, but not much better.
|
For me the numbers of cycles vary wildly from run to run. Sometimes the igf gets a little quicker, sometimes slower. One example is shown below. But the more interesting question is why the igf showed a 10x speedup on numbers but hardly any difference on defined classes? Of course I would be very happy to see a 10x speedup on defined classes too!
|
the reason of not achieving 10x speedup is due to the type information and the cost of slot access.
Imagine the total cost is 10X for normal GF and X for IGF. Above two factor adds two overheads, resulting in 10X+A+B vs X+A+B. Then obviously 10 times speedup is not achievable since A+B could be very large. |
I updated the environment and noticed that the examples in |
|
The benchmarks provided are for methods on the built-in lisp types number, fixnum and double-float. To test the behaviour on defined classes we added a simple boxing class and found that peformance degraded when using inlined-generic-functions, inlined. We found the following numbers of processor cycles for the four methods in
playground.lisp
, respectively:Experiment on sbcl 1.3.5.24
See bon@8b6e4d5
So my question is whether this indicates that inlined-generic-functions only speed up on built-in types and not on defined classes?
The text was updated successfully, but these errors were encountered: