-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix tests + add more * Add integration test * Fix test * Add changelog entry + format cairo program * fmt * Fix test * Clippy * clippy
- Loading branch information
Showing
5 changed files
with
223 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
cairo_programs/bad_programs/split_felt_bad_constants.cairo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const MAX_HIGH = 1; | ||
const MAX_LOW = 1; | ||
|
||
func main() { | ||
let value =1; | ||
hint_func(MAX_HIGH, MAX_LOW, value); | ||
return(); | ||
} | ||
func hint_func(MAX_HIGH: felt, MAX_LOW: felt, value: felt) -> (felt, felt) { | ||
alloc_locals; | ||
local low: felt; | ||
local high: felt; | ||
%{ | ||
from starkware.cairo.common.math_utils import assert_integer | ||
assert ids.MAX_HIGH < 2**128 and ids.MAX_LOW < 2**128 | ||
assert PRIME - 1 == ids.MAX_HIGH * 2**128 + ids.MAX_LOW | ||
assert_integer(ids.value) | ||
ids.low = ids.value & ((1 << 128) - 1) | ||
ids.high = ids.value >> 128 | ||
%} | ||
return(low, high); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132da2c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.30
.add_u64_with_felt/1
3
ns/iter (± 0
)2
ns/iter (± 0
)1.50
add_u64_with_felt/2
3
ns/iter (± 0
)2
ns/iter (± 0
)1.50
add_u64_with_felt/3
2
ns/iter (± 0
)1
ns/iter (± 0
)2
add_u64_with_felt/4
2
ns/iter (± 0
)1
ns/iter (± 0
)2
add_u64_with_felt/5
2
ns/iter (± 0
)1
ns/iter (± 0
)2
add_u64_with_felt/6
3
ns/iter (± 0
)2
ns/iter (± 0
)1.50
add_u64_with_felt/7
3
ns/iter (± 0
)2
ns/iter (± 0
)1.50
add_u64_with_felt/8
3
ns/iter (± 0
)2
ns/iter (± 0
)1.50
This comment was automatically generated by workflow using github-action-benchmark.
CC: @unbalancedparentheses