diff options
author | Jason Gross <jgross@mit.edu> | 2016-10-09 22:19:33 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2016-10-09 22:27:15 -0400 |
commit | 3e7ef06ef6d9beb00b22a66c1bc3368dbe455c06 (patch) | |
tree | d9c737103a62fd70aec38470a5a04dd5913a36ec /src/Util/ZUtil.v | |
parent | 893481161e1d4db357264e80d84be97c10333371 (diff) |
Make Ztestbit_full
It doesn't call autorewrite with Ztestbit
After | File Name | Before || Change
---------------------------------------------------------------------------------------------
5m54.66s | Total | 6m23.36s || -0m28.69s
---------------------------------------------------------------------------------------------
0m35.89s | ModularArithmetic/Conversion | 0m40.00s || -0m04.10s
1m34.54s | Test/Curve25519SpecTestVectors | 1m38.00s || -0m03.46s
0m21.20s | ModularArithmetic/Pow2BaseProofs | 0m24.65s || -0m03.44s
0m19.47s | EdDSARepChange | 0m21.84s || -0m02.37s
0m10.19s | Testbit | 0m12.63s || -0m02.44s
0m08.34s | ModularArithmetic/Montgomery/ZProofs | 0m09.42s || -0m01.08s
0m07.96s | Encoding/PointEncoding | 0m09.16s || -0m01.20s
0m03.35s | ModularArithmetic/Tutorial | 0m04.54s || -0m01.18s
0m27.76s | ModularArithmetic/ModularBaseSystemProofs | 0m28.15s || -0m00.38s
0m14.36s | Specific/GF25519 | 0m14.43s || -0m00.07s
0m12.87s | Util/ZUtil | 0m13.72s || -0m00.85s
0m08.48s | BoundedArithmetic/ArchitectureToZLikeProofs | 0m08.79s || -0m00.30s
0m08.09s | BoundedArithmetic/Double/Proofs/Multiply | 0m08.44s || -0m00.34s
0m07.75s | Specific/GF1305 | 0m07.64s || +0m00.11s
0m07.03s | BoundedArithmetic/Double/Proofs/SpreadLeftImmediate | 0m07.38s || -0m00.34s
0m05.34s | BoundedArithmetic/Double/Proofs/RippleCarryAddSub | 0m05.46s || -0m00.12s
0m04.05s | BaseSystemProofs | 0m04.50s || -0m00.45s
0m03.76s | ModularArithmetic/BarrettReduction/ZHandbook | 0m04.04s || -0m00.28s
0m03.44s | ModularArithmetic/ModularBaseSystemListProofs | 0m03.53s || -0m00.08s
0m03.32s | BoundedArithmetic/InterfaceProofs | 0m03.58s || -0m00.26s
0m03.04s | ModularArithmetic/BarrettReduction/ZGeneralized | 0m03.22s || -0m00.18s
0m02.86s | Encoding/PointEncodingPre | 0m02.92s || -0m00.06s
0m02.74s | BoundedArithmetic/Double/Proofs/Decode | 0m03.60s || -0m00.85s
0m02.66s | ModularArithmetic/ModularArithmeticTheorems | 0m03.44s || -0m00.77s
0m02.42s | ModularArithmetic/BarrettReduction/ZBounded | 0m02.47s || -0m00.05s
0m02.34s | ModularArithmetic/ModularBaseSystemOpt | 0m02.39s || -0m00.05s
0m02.08s | Specific/FancyMachine256/Barrett | 0m02.24s || -0m00.16s
0m02.01s | Specific/FancyMachine256/Montgomery | 0m02.45s || -0m00.44s
0m01.78s | ModularArithmetic/Montgomery/ZBounded | 0m01.92s || -0m00.13s
0m01.78s | Specific/FancyMachine256/Core | 0m01.77s || +0m00.01s
0m01.54s | ModularArithmetic/BarrettReduction/Z | 0m01.52s || +0m00.02s
0m01.34s | ModularArithmetic/PrimeFieldTheorems | 0m01.59s || -0m00.25s
0m01.24s | BaseSystem | 0m01.20s || +0m00.04s
0m01.09s | BoundedArithmetic/Double/Repeated/Proofs/Decode | 0m01.14s || -0m00.04s
0m01.08s | ModularArithmetic/ExtendedBaseVector | 0m01.25s || -0m00.16s
0m00.96s | Util/NumTheoryUtil | 0m00.99s || -0m00.03s
0m00.88s | BoundedArithmetic/Double/Proofs/BitwiseOr | 0m01.14s || -0m00.25s
0m00.86s | Experiments/EncodingLemmas | 0m00.93s || -0m00.07s
0m00.83s | BoundedArithmetic/Double/Proofs/LoadImmediate | 0m01.10s || -0m00.27s
0m00.66s | BoundedArithmetic/X86ToZLike | 0m00.73s || -0m00.06s
0m00.66s | Spec/EdDSA | 0m00.66s || +0m00.00s
0m00.66s | ModularArithmetic/PseudoMersenneBaseParamProofs | 0m00.80s || -0m00.14s
0m00.65s | ModularArithmetic/ModularBaseSystem | 0m00.59s || +0m00.06s
0m00.63s | Encoding/ModularWordEncodingTheorems | 0m00.77s || -0m00.14s
0m00.62s | BoundedArithmetic/Double/Repeated/Proofs/RippleCarryAddSub | 0m00.62s || +0m00.00s
0m00.60s | ModularArithmetic/ExtPow2BaseMulProofs | 0m00.98s || -0m00.38s
0m00.60s | ModularArithmetic/ModularBaseSystemList | 0m00.66s || -0m00.06s
0m00.60s | BoundedArithmetic/Double/Proofs/SelectConditional | 0m00.58s || +0m00.02s
0m00.58s | Encoding/ModularWordEncodingPre | 0m00.71s || -0m00.13s
0m00.54s | Spec/Ed25519 | 0m00.63s || -0m00.08s
0m00.53s | BoundedArithmetic/Interface | 0m00.90s || -0m00.37s
0m00.53s | Spec/ModularWordEncoding | 0m00.65s || -0m00.12s
0m00.52s | ModularArithmetic/ZBounded | 0m00.67s || -0m00.15s
0m00.52s | BoundedArithmetic/ArchitectureToZLike | 0m00.64s || -0m00.12s
0m00.50s | BoundedArithmetic/Double/Repeated/Proofs/LoadImmediate | 0m00.47s || +0m00.03s
0m00.50s | BoundedArithmetic/Double/Repeated/Core | 0m00.56s || -0m00.06s
0m00.49s | ModularArithmetic/Pre | 0m00.52s || -0m00.03s
0m00.48s | BoundedArithmetic/StripCF | 0m00.52s || -0m00.04s
0m00.46s | BoundedArithmetic/Double/Repeated/Proofs/SelectConditional | 0m00.52s || -0m00.06s
0m00.46s | BoundedArithmetic/Double/Repeated/Proofs/BitwiseOr | 0m00.47s || -0m00.00s
0m00.46s | ModularArithmetic/PseudoMersenneBaseParams | 0m00.46s || +0m00.00s
0m00.45s | BoundedArithmetic/Double/Core | 0m00.70s || -0m00.24s
0m00.43s | Spec/ModularArithmetic | 0m00.35s || +0m00.08s
0m00.42s | ModularArithmetic/Montgomery/Z | 0m00.42s || +0m00.00s
0m00.40s | ModularArithmetic/Pow2Base | 0m00.60s || -0m00.19s
Diffstat (limited to 'src/Util/ZUtil.v')
-rw-r--r-- | src/Util/ZUtil.v | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/src/Util/ZUtil.v b/src/Util/ZUtil.v index bf1e704e2..c9270e9dd 100644 --- a/src/Util/ZUtil.v +++ b/src/Util/ZUtil.v @@ -2851,14 +2851,21 @@ Ltac pull_Zmod := | _ => progress autorewrite with pull_Zmod end. -Ltac Ztestbit := - repeat match goal with - | _ => progress autorewrite with Ztestbit - | [ |- context[Z.testbit ?x ?y] ] - => rewrite (Z.testbit_neg_r x y) by zutil_arith - | [ |- context[Z.testbit ?x ?y] ] - => rewrite (Z.bits_above_pow2 x y) by zutil_arith - | [ |- context[Z.testbit ?x ?y] ] - => rewrite (Z.bits_above_log2 x y) by zutil_arith - | _ => progress autorewrite with Ztestbit_full - end. +Ltac Ztestbit_full_step := + match goal with + | _ => progress autorewrite with Ztestbit_full + | [ |- context[Z.testbit ?x ?y] ] + => rewrite (Z.testbit_neg_r x y) by zutil_arith + | [ |- context[Z.testbit ?x ?y] ] + => rewrite (Z.bits_above_pow2 x y) by zutil_arith + | [ |- context[Z.testbit ?x ?y] ] + => rewrite (Z.bits_above_log2 x y) by zutil_arith + end. +Ltac Ztestbit_full := repeat Ztestbit_full_step. + +Ltac Ztestbit_step := + match goal with + | _ => progress autorewrite with Ztestbit + | _ => progress Ztestbit_full_step + end. +Ltac Ztestbit := repeat Ztestbit_step. |