diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2023-01-25 19:46:41 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2023-01-25 19:46:41 -0500 |
| commit | d3101309dc4ae1078370cd24aa722ccd459d3e06 (patch) | |
| tree | 5ec3e0c23547d266133c103178170c933ec154aa /src | |
| parent | 4569b21bae0c7056fb2199443a571b80c0931641 (diff) | |
Time compiler executions in verify.bqn
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/verify.bqn | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/bootstrap/verify.bqn b/src/bootstrap/verify.bqn index c3b9d737..c833c2f2 100644 --- a/src/bootstrap/verify.bqn +++ b/src/bootstrap/verify.bqn @@ -6,11 +6,17 @@ c ← (1‿3/⟨glyphs⊸•Import,•Import⟩) {𝕎𝕩}¨ f # Resulting com c ↩ (∾glyphs){𝕗⊸𝕏}¨ c t ← (∾∾⟜(@+10)¨)¨ (¯5⊸↓∾gl˙)⌾⊑⌾⊑ •FLines¨ f # Compiler source -# 4⊸↑ to strip source info -# ⋈⁼∘∾⍟=¨⌾(2⊑¨2⊸⊑) to turn only-dyadic functions to ambivalent -! ≡○(4⊸↑)´ (2↑c) {𝕎𝕩}¨ ⊏t -•Out "Boot -1 verified!" -! ≡○(⋈⁼∘∾⍟=¨⌾(2⊑¨2⊸⊑) 4⊸↑)´ (0‿2⊏c) {𝕎𝕩}¨ 1⊏t -•Out "Boot -2 verified!" -! ≡○(⋈⁼∘∾⍟=¨⌾(2⊑¨2⊸⊑) 4⊸↑)´ (0‿3⊏c) {𝕎𝕩}¨ 2⊏t -•Out "Boot -3 verified!" +# Check that compiler 𝕩 compiles 𝕩-1 same as full compiler +Ver ← { + norm ← {𝕎𝕏}˜´ (2⌊𝕩) ↑ ⟨ + 4⊸↑ # Strip source info, always + ⋈⁼∘∾⍟=¨⌾(2⊑¨2⊸⊑) # Turn only-dyadic functions to ambivalent, only ≥2 + ⟩ + ! ≡○Norm´ (0‿𝕩⊏c) {𝕎𝕩}¨ (𝕩-1)⊏t + •Out ∾⟨"Boot -",'0'+𝕩," verified!"⟩ +} +Ver¨ 1+↕3 + +•Out "" +•Out "Compile times, in milliseconds:" +•Show 1e3÷˜⌊1e6× (1≥-)◶∞‿{30(𝕨⊑c)•_timed𝕩⊑t}⌜˜ ↕≠c |
