mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
LibCrypto: Add Fibonacci signed and unsigned bigint benchmarks
This commit is contained in:
parent
ce98d2bbf3
commit
51a2fb3ffc
Notes:
github-actions[bot]
2025-04-28 10:07:17 +00:00
Author: https://github.com/devgianlu
Commit: 51a2fb3ffc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4482
Reviewed-by: https://github.com/gmta ✅
1 changed files with 12 additions and 0 deletions
|
@ -47,6 +47,12 @@ TEST_CASE(test_bigint_fib500)
|
|||
EXPECT_EQ(bigint_fibonacci(500).words(), result);
|
||||
}
|
||||
|
||||
BENCHMARK_CASE(bench_bigint_fib100000)
|
||||
{
|
||||
auto res = bigint_fibonacci(100000);
|
||||
(void)res;
|
||||
}
|
||||
|
||||
TEST_CASE(test_unsigned_bigint_addition_initialization)
|
||||
{
|
||||
Crypto::UnsignedBigInteger num1;
|
||||
|
@ -637,6 +643,12 @@ TEST_CASE(test_signed_bigint_fibo500)
|
|||
EXPECT_EQ(result.unsigned_value().words(), expected_result);
|
||||
}
|
||||
|
||||
BENCHMARK_CASE(bench_signed_bigint_fib100000)
|
||||
{
|
||||
auto res = bigint_signed_fibonacci(100000);
|
||||
(void)res;
|
||||
}
|
||||
|
||||
TEST_CASE(test_signed_addition_edgecase_borrow_with_zero)
|
||||
{
|
||||
Crypto::SignedBigInteger num1 { Crypto::UnsignedBigInteger { { UINT32_MAX - 3, UINT32_MAX } }, false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue