mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 20:23:11 +03:00
[ papers ] Comment out petersonsCorrect
for performance reasons
On average across 10 runs on an Intel Core i7-8750H with 15.2GB of available system memory (16GB installed in system), type-checking `libs/papers/Search/GCL.idr` WITH `petersonsCorrect` takes: * 1 minute 48.7 seconds, consuming 3.92GB of RAM By contrast, commenting `petersonsCorrect` out results in type-checking taking on average (same #runs, same config): * 0 minutes 1.2 seconds, consuming 0.25GB of RAM And good luck trying to evaluate the thing! (This might be a good performance test at some point, but uh, we're not there yet...)
This commit is contained in:
parent
c5b114209e
commit
260d9ecb58
@ -332,6 +332,9 @@ checkPetersons = exists $
|
||||
))
|
||||
tree
|
||||
|
||||
{- N.B.: commenting this in causes the type-checking of this file to take ~2
|
||||
- minutes and ~4 GB of RAM
|
||||
-
|
||||
||| /!\ CAUTION: THIS IS **VERY** SLOW + RESOURCE INTENSIVE /!\
|
||||
|||
|
||||
||| Prove that Peterson's Algorithm is a solution to the Critical Section
|
||||
@ -350,4 +353,5 @@ petersonsCorrect : Models ? ?
|
||||
petersonsCorrect =
|
||||
diModels (GCL State, GCL State) State
|
||||
(snd (check @{%search} (limit 1000) checkPetersons @{Oh}))
|
||||
-}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user