-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
386 additions
and
49 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
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,81 @@ | ||
=========================================================================================================================== | ||
| File | PythonVM (ms) | GoVM (ms) | | ||
=========================================================================================================================== | ||
| get_point_from_x.small.cairo | 971 | 125 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| is_quad_residue.small.cairo | 963 | 152 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| reduce_v1.small.cairo | 931 | 130 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| uint256_unsigned_div_rem.small.cairo | 1061 | 132 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| set_add.small.cairo | 749 | 117 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| split64.small.cairo | 1014 | 117 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| uint256_signedNN.small.cairo | 752 | 114 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| split_felt.small.cairo | 841 | 145 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| split_int.small.cairo | 1037 | 133 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| uint256_add.small.cairo | 921 | 110 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| signed_div_rem.small.cairo | 816 | 117 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| sqrt.small.cairo | 960 | 119 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| uint256_sqrt.small.cairo | 1195 | 115 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| assert_not_zero.cairo | 586 | 100 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| blake.starknet_with_keccak.cairo | 2498 | 144 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| import_secp256R1P.small.cairo | 699 | 123 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| memcpy.cairo | 704 | 124 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| unsigned_div_rem.small.cairo | 843 | 118 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| factorial.cairo | 1161 | 123 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| hintrefs.cairo | 676 | 127 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| cmp.small.cairo | 897 | 110 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| dict_squash.small.cairo | 1240 | 166 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| div_mod_n.small.cairo | 921 | 113 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| find_element.small.cairo | 939 | 124 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| uint256_mul_div_mod.small.cairo | 1032 | 119 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| verify_zero.small.cairo | 781 | 112 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| ec.small.cairo | 1042 | 129 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| memset.cairo | 701 | 128 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| pow.small.cairo | 887 | 112 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| search_sorted_lower.small.cairo | 836 | 134 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| alloc.cairo | 666 | 126 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| simple.cairo | 596 | 110 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| assert_250_bits.small.cairo | 979 | 120 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| assert_not_equal.cairo | 638 | 101 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| dict.cairo | 678 | 115 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| is_positive.small.cairo | 884 | 128 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| usort.small.cairo | 797 | 119 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| verify_ecdsa_signature.small.cairo | 758 | 117 | | ||
--------------------------------------------------------------------------------------------------------------------------- | ||
| fib.cairo | 634 | 116 | | ||
=========================================================================================================================== |
31 changes: 31 additions & 0 deletions
31
integration_tests/cairo_zero_hint_tests/is_zero.small.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,31 @@ | ||
// Returns 1 if x == 0 (mod secp256k1_prime), and 0 otherwise. | ||
// Serves as integration test for the following hints : | ||
// isZeroNondetCode | ||
// isZeroPackCode | ||
// isZeroDivModCode | ||
|
||
%builtins range_check | ||
|
||
from starkware.cairo.common.cairo_secp.field import is_zero, SumBigInt3 | ||
|
||
func main{range_check_ptr}() -> () { | ||
|
||
// Test One | ||
let a = SumBigInt3(0, 0, 0); | ||
let (res: felt) = is_zero(a); | ||
assert res = 1; | ||
|
||
// Test Two | ||
let b = SumBigInt3(42, 0, 0); | ||
let (res: felt) = is_zero(b); | ||
assert res = 0; | ||
|
||
// Test Three | ||
let c = SumBigInt3( | ||
77371252455336262886226991, 77371252455336267181195263, 19342813113834066795298815 | ||
); | ||
let (res: felt) = is_zero(c); | ||
assert res = 1; | ||
|
||
return (); | ||
} |
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
Oops, something went wrong.