Commit d02b329
* wip
* Manually implement some common derives
Also comment `from` impls for primitive numbers and (De)Serialize derives
* Implement FromPrimitive
* Implement ToPrimitive
* Add BitAnd/Xor/Or implementations
* Implement bit shift operators
* Remove Signed implementation
* Remove Integer impl
* Impl Bounded
* Impl from_str_radix
* Add iter_u64_digits impl
* Add Add impls
* Add Sub impls
* Patch arbitrary
* Fix some warnings
* Implement parse_bytes
* Implement utility methods for tests
* Fix test compilation errors
* Add From impl for signed primitive nums
* Impl From<BigInt>
* Re-add bits fn
* Impl Signed
* Impl (De)Serialize
* Fix compile errors and clippy suggestions
* Pin cairo 1 compiler version
* Reorder impls
* Fix compile error
* Fix various errors (tests pass!)
* Remove to_bytes_be
* Fix panicky from_bytes_be
* Fix is_positive
* Fix str conversions
* Add documentation
* Fix from_i64 accepting negative numbers
* Use BigUint in from_bytes_be
* Remove unneded field macro
* Pin lambdaworks commit
* Fix keccak
* Fix from_i64 condition was reversed
* Change Debug::fmt to return number in decimal
* Appease clippy in felt crate
* Silence clippy warning (for now)
* Fix nostd error
* Update lambdaworks to latest revision
* Update rust version in CI
* Change sqrt for lambdaworks'
* Manually build BigDigits on to_biguint
* Use a bigger number of iterations for square bench
* Update lambdaworks-math revision
* Fix sqrt tests and Shl/Shr impl (+add tests)
* Update Cargo.lock
* Appease clippy and fix Shr<usize>
* Square input instead of using prop_assume
* Revert the change to Shr
* Appease clippy
* Use bits instead of shl in range check
* Remove `FeltBigInt`
* Add lamdaworks-benchmarks.sh
* Add lamdaworks-benchmarks.md
* Update lamdaworks-benchmarks.md
* Update commits
* Update .md commits
* Looooong benchmark
* Remove bigbox clippy allow
* Update lambdaworks to latest, and change AddAssign
* Remove `-P` option in `xargs`
In the measurements we got through `perf`, there were 3 to 4 times more page faults compared to base.
This can be explained by the runner using swap memory because of the increase in memory usage.
We can fix it by reducing the amount of processes ran in parallel by xargs (2 -> 1)
* Change `to_(b|l)e_bytes` to not use lw primitives
* Change comments in `Add<&Felt252> for u64`
* Fix: wasn't indexing properly :P
* Override default `div_mod_floor` impl for Felt252
* Disable swap memory before benchmarking
* Reduce number of warmups and runs
* Optimize `assert_le_felt`
(used in math_integration_benchmark)
* Use constant for zero() function
* Extract division by constant
* Use BigUint in assert_le_felt
This part uses comparisons and integer division (that use `to_biguint`), so it's better to use `BigUints` directly.
* Avoid calling `BigInt::abs`
* Update changelog
* Add tests for felt
* Add TODO
* Add other texts
* Update lambdaworks to latest
* Revert hyperfine arguments to main
* Remove unneeded clones and into_owneds
* Remove unneeded references and clones
* Add BREAKING note to changelog
* Make Felt252::one just copy a constant
* Impl From<bool> for Felt252
* Change some uses of get_ref with get_mut_ref
Using `get_ref` and later updating the variable with an `exec_scopes.insert_value(...)` causes two lookups in a hashmap, along with two creation of `String` from a slice.
This change reduces it to just a single lookup and `String` creation.
* Unify mem*_continue_* functions
* Run benchmarks sequentially to avoid mem issues
* Use div_mod_floor instead of div and mod
* Use BigUint for non-modular calculations
* Add TODO
* Include both lib.rs
* Fix lib_bigint_felt
* Add test-lambdaworks-felt workflow
* Fix failling example
* Move extern crate import to lib.rs
* Update changelog
* Fix changelog
* Fix example
* Remove benchmark docs
* Remove clone
* Move crate-level attribute to lib.rs
* Fix changelog
* Remove blank line in toml
* Use one line cfg directives
* Remove reference
* Restore clone
* Fix doc test
* Add `lambdaworks-felt` feature to vm crate
* Add instructions to (de)activate the new feature
* Use different matrix group for lambdaworks felt in CI
* Move the sections a bit
* Update lambdaworks-math version to 0.1.1
* Invert the part talking about features
---------
Co-authored-by: Pedro Fontana <[email protected]>
Co-authored-by: Tomá <[email protected]>
Co-authored-by: Mario Rugiero <[email protected]>
1 parent 2f48247 commit d02b329
File tree
30 files changed
+3647
-1819
lines changed- .github/workflows
- deps/parse-hyperlinks/src
- felt
- src
- vm
- src
- hint_processor
- builtin_hint_processor
- cairo_keccak
- cairo_1_hint_processor
- types
- vm/runners/builtin_runner
30 files changed
+3647
-1819
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 45 | + | |
54 | 46 | | |
55 | 47 | | |
56 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
21 | 17 | | |
22 | 18 | | |
23 | 19 | | |
| |||
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
224 | | - | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | | - | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
231 | | - | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
88 | 98 | | |
89 | | - | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
| 102 | + | |
| 103 | + | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
| |||
0 commit comments