16 Commits

Author SHA1 Message Date
Jakub Nabaglo
bc57a561e6 Delete CrandallField 2021-11-02 12:29:26 -07:00
Daniel Lubarov
caf95ae9dc fmt 2021-11-01 21:50:42 -07:00
Daniel Lubarov
eb76bc5f67 cargo fix 2021-11-01 21:42:29 -07:00
Hamish Ivey-Law
c406f464b8
Faster squaring in extension fields (#318)
* Faster squaring for extension fields; use in cube().

* Add squaring to arithmetic benchmark.

* Rename variable to remove warning; adjust comment.

* Inline always (improves latency measurements a lot).
2021-10-22 16:05:00 +11:00
Hamish Ivey-Law
ad30f4aca6
WIP: Remove old benchmarks (#297)
* Remove old benchmarkmarking binaries now that we use Criterion.

* Benchmark CrandallField alongside Goldilocks.
2021-10-12 09:46:38 +11:00
Hamish Ivey-Law
8f59381c87
Faster modular inverse (#292)
* Working "faster" inverse algo, using u128s.

* Faster inverse_2exp for large exp.

* More inverse tests.

* Make f, g u64.

* Comments.

* Unroll first two iterations.

* Fix bug and re-unroll first two iterations.

* Simplify loop.

* Refactoring and documentation.

* Clean up testing.

* Move inverse code to inversion.rs; use in GoldilocksField.

* Bench quartic Goldilocks extension too.

* cargo fmt

* Add more documentation.

* Address Jakub's comments.
2021-10-10 10:39:02 +11:00
Daniel Lubarov
dc600d5abf
Hash benchmarks (#295) 2021-10-09 14:07:49 -07:00
Jakub Nabaglo
46cc27571d
Delete unrolled FFT (#258) 2021-09-21 17:32:38 -07:00
Daniel Lubarov
91f7b4e300
Replace CrandallQuarticField with a more generic QuarticExtension (#232)
* Replace `CrandallQuarticField` with a more generic `QuarticExtension`

And likewise for `CrandallQuadraticField`.

There are a few parameters which we can't automatically derive (in const Rust), so I specified them in a `AutoExtendable` trait.

This would make it fairly easy to add extension fields for `GoldilocksField` and any future fields.

* Attempt to derive 2-adicity, see Hamish's feedback

* Simplify TWO_ADICITY based on chat with Hamish

* PR feedback

* Merge AutoExtendable into Extendable (#235)
2021-09-13 11:45:17 -07:00
Daniel Lubarov
ba8b40f0e6
Goldilocks field (#227)
* Goldilocks field

Based on Hamish's old branch, but I updated it with a few missing things like generators.

Pulled the inversion code into a shared helper method to avoid redundancy.

Just the base field for now. We can add a quartic extension field later.

* typo

* PR feedback

* More overflowing -> wrapping

* fmt

* cleanup
2021-09-10 10:39:27 -07:00
Daniel Lubarov
a42bec0354 cargo fix 2021-09-05 22:36:10 -07:00
Jakub Nabaglo
6949d04c72
Field arithmetic benchmark improvements (#200)
* Field arithmetic benchmark improvements

* Separate throughput/latency benchmarks

* Widen addition throughput benchmark
2021-08-24 11:56:00 -07:00
Daniel Lubarov
d41924dad3
Benchmark transpose (#190)
* Benchmark transpose

* fmt
2021-08-18 09:43:19 -07:00
Daniel Lubarov
d497c10858 Import 2021-08-18 08:51:24 -07:00
Daniel Lubarov
c31c06d227
FFT/LDE benches (#188)
And expose FftStrategy so we can bench both
2021-08-18 08:36:40 -07:00
Daniel Lubarov
cc6c365176
A couple field benchmarks (#161) 2021-08-08 09:14:50 -07:00