Skip to content

Performance improvement in Extractor

Viktor Kuncak requested to merge perf into master

Created by: mantognini

When sampling stainless' performance, the deconstruct function is listed as one of the most -- if not the most -- time consuming part of the overall execution. In order to optimise it, we can re-order the pattern matching cases to put the most frequent at the top.

The order proposed here is based (for the significantly most frequent ones) on statistics acquired when verifying all stainless benchmark under verification/valid. On my workstation, I could see the following effect when executing sbt it:test:

version wall clock user time
master 39:30 min 2771 s
patched v1 32:52 min 2349 s
patched v2 30:49 min 2261 s

So the results are not negligible! :-)

You can also compare the results on laraquad:

Merge request reports