Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero allocation univariate gcd with Int #237

Merged
merged 1 commit into from
Feb 14, 2023
Merged

Zero allocation univariate gcd with Int #237

merged 1 commit into from
Feb 14, 2023

Conversation

blegat
Copy link
Member

@blegat blegat commented Feb 13, 2023

Part of #194

Int64

Benchmark 0

Before

Time Alloc Memory
SIMDPolynomials 474.658 ns 16 1.14 KiB
DynamicPolynomials 6.417 μs 194 10.66 KiB
TypedPolynomials 301.902 ns 12 848 bytes

After

Time Alloc Memory
SIMDPolynomials 376.346 ns 8 400 bytes
DynamicPolynomials 6.153 μs 196 10.81 KiB
TypedPolynomials 165.017 ns 4 336 bytes

Benchmark 1

Before

Time Alloc Memory
SIMDPolynomials 140.808 μs 1976 2.10 MiB
DynamicPolynomials 1.133 ms 24028 3.28 MiB
TypedPolynomials 122.591 μs 1281 2.26 MiB

After

Time Alloc Memory
SIMDPolynomials 129.194 μs 1904 2.10 MiB
DynamicPolynomials 1.067 ms 24046 3.28 MiB
TypedPolynomials 118.609 μs 1125 2.25 MiB

Benchmark 2

Before

Time Alloc Memory
SIMDPolynomials 5.388 μs 282 45.50 KiB
DynamicPolynomials 56.052 μs 1979 160.55 KiB
TypedPolynomials 13.478 μs 329 81.38 KiB

After

Time Alloc Memory
SIMDPolynomials 4.766 μs 266 44.00 KiB
DynamicPolynomials 53.152 μs 1983 161.02 KiB
TypedPolynomials 5.725 μs 191 74.66 KiB

Benchmark 3

Before

Time Alloc Memory
SIMDPolynomials 707.457 μs 31439 17.63 MiB
DynamicPolynomials 6.215 ms 156563 25.83 MiB
TypedPolynomials 390.848 μs 6742 25.04 MiB

After

Time Alloc Memory
SIMDPolynomials 690.351 μs 31375 17.62 MiB
DynamicPolynomials 5.755 ms 156579 25.83 MiB
TypedPolynomials 378.289 μs 6438 25.03 MiB

BigInt

Benchmark 0

Before

Time Alloc Memory
SIMDPolynomials 1.062 μs 50 1.73 KiB
DynamicPolynomials 7.118 μs 234 11.34 KiB
TypedPolynomials 867.320 ns 46 1.42 KiB

After

Time Alloc Memory
SIMDPolynomials 908.128 ns 42 1008 bytes
DynamicPolynomials 6.748 μs 236 11.50 KiB
TypedPolynomials 716.375 ns 38 944 bytes

Benchmark 1

Before

Time Alloc Memory
SIMDPolynomials 436.290 μs 14936 1.94 MiB
DynamicPolynomials 1.239 ms 35358 3.06 MiB
TypedPolynomials 441.870 μs 14139 2.09 MiB

After

Time Alloc Memory
SIMDPolynomials 424.879 μs 14864 1.93 MiB
DynamicPolynomials 1.139 ms 35376 3.06 MiB
TypedPolynomials 433.056 μs 13983 2.08 MiB

Benchmark 2

Before

Time Alloc Memory
SIMDPolynomials 9.859 μs 438 48.38 KiB
DynamicPolynomials 61.897 μs 2183 164.87 KiB
TypedPolynomials 20.753 μs 452 83.48 KiB

After

Time Alloc Memory
SIMDPolynomials 9.612 μs 422 46.88 KiB
DynamicPolynomials 58.479 μs 2187 165.34 KiB
TypedPolynomials 12.317 μs 314 76.76 KiB

Benchmark 3

Before

Time Alloc Memory
SIMDPolynomials 2.559 ms 82161 18.49 MiB
DynamicPolynomials 7.211 ms 202251 26.71 MiB
TypedPolynomials 3.124 ms 57416 25.89 MiB

After

Time Alloc Memory
SIMDPolynomials 2.589 ms 82097 18.48 MiB
DynamicPolynomials 7.164 ms 202267 26.71 MiB
TypedPolynomials 3.188 ms 57112 25.88 MiB

Rational{BigInt}

Benchmark 0

Before

Time Alloc Memory
SIMDPolynomials 3.114 μs 233 6.23 KiB
DynamicPolynomials 8.093 μs 388 15.06 KiB
TypedPolynomials 2.987 μs 229 5.92 KiB

After

Time Alloc Memory
SIMDPolynomials 2.933 μs 225 5.48 KiB
DynamicPolynomials 7.901 μs 390 15.22 KiB
TypedPolynomials 2.741 μs 221 5.42 KiB

Benchmark 1

Before

Time Alloc Memory
SIMDPolynomials 1.619 ms 76491 4.21 MiB
DynamicPolynomials 2.365 ms 89933 5.31 MiB
TypedPolynomials 1.621 ms 75855 4.37 MiB

After

Time Alloc Memory
SIMDPolynomials 1.592 ms 76435 4.21 MiB
DynamicPolynomials 2.240 ms 89947 5.31 MiB
TypedPolynomials 1.604 ms 75715 4.37 MiB

Benchmark 2

Before

Time Alloc Memory
SIMDPolynomials 18.793 μs 1025 80.80 KiB
DynamicPolynomials 71.722 μs 2884 201.46 KiB
TypedPolynomials 27.907 μs 1035 116.04 KiB

After

Time Alloc Memory
SIMDPolynomials 18.604 μs 1009 79.30 KiB
DynamicPolynomials 70.529 μs 2888 201.93 KiB
TypedPolynomials 20.573 μs 897 109.32 KiB

Benchmark 3

Before

Time Alloc Memory
SIMDPolynomials 5.781 ms 242358 31.13 MiB
DynamicPolynomials 11.797 ms 339458 38.81 MiB
TypedPolynomials 7.177 ms 215551 38.59 MiB

After

Time Alloc Memory
SIMDPolynomials 6.390 ms 242294 31.12 MiB
DynamicPolynomials 11.422 ms 339474 38.81 MiB
TypedPolynomials 7.774 ms 215247 38.58 MiB

@blegat blegat merged commit a58b33f into master Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant