Rough guess, it seems about the same. 1.22.2:
BenchmarkAddFixed-8 1000000000 0.7931 ns/op
0 B/op 0 allocs/op
BenchmarkAddDecimal-8 18156120 66.27 ns/op
80 B/op 2 allocs/op
BenchmarkAddBigInt-8 100000000 10.65 ns/op
0 B/op 0 allocs/op
BenchmarkAddBigFloat-8 18105667 66.33 ns/op
48 B/op 1 allocs/op
BenchmarkMulFixed-8 295736967 3.939 ns/op
0 B/op 0 allocs/op
BenchmarkMulDecimal-8 17827340 67.07 ns/op
80 B/op 2 allocs/op
BenchmarkMulBigInt-8 100000000 10.49 ns/op
0 B/op 0 allocs/op
BenchmarkMulBigFloat-8 49651710 24.12 ns/op
0 B/op 0 allocs/op
BenchmarkDivFixed-8 309444237 3.661 ns/op
0 B/op 0 allocs/op
BenchmarkDivDecimal-8 2426755 469.6 ns/op
384 B/op 12 allocs/op
BenchmarkDivBigInt-8 34289701 34.90 ns/op
8 B/op 1 allocs/op
BenchmarkDivBigFloat-8 9028243 113.6 ns/op
24 B/op 2 allocs/op
BenchmarkCmpFixed-8 1000000000 0.2784 ns/op
0 B/op 0 allocs/op
BenchmarkCmpDecimal-8 181467510 6.475 ns/op
0 B/op 0 allocs/op
BenchmarkCmpBigInt-8 244090252 4.805 ns/op
0 B/op 0 allocs/op
BenchmarkCmpBigFloat-8 256882512 5.081 ns/op
0 B/op 0 allocs/op
BenchmarkStringFixed-8 23666678 50.64 ns/op
24 B/op 1 allocs/op
BenchmarkStringNFixed-8 23938096 49.66 ns/op
24 B/op 1 allocs/op
BenchmarkStringDecimal-8 5196085 197.0 ns/op
56 B/op 4 allocs/op
BenchmarkStringBigInt-8 10304404 98.00 ns/op
16 B/op 1 allocs/op
BenchmarkStringBigFloat-8 2902165 395.2 ns/op
176 B/op 7 allocs/op
BenchmarkWriteTo-8 37140805 31.71 ns/op
28 B/op 0 allocs/op
> On Apr 24, 2024, at 2:52 PM, Stephen Illingworth
> <[email protected]> wrote:
>
> How does it perform with v1.22.0? I found a small but measurable drop in
> throughput in one of my projects when compiled with 1.22.0. Issue raised here:
>
> https://github.com/golang/go/issues/65647#issuecomment-1944830588
>
> I have a feeling it's an issue with my older development hardware. But it's a
> compute bound project , similar to your project, so I'd be interested in
> hearing how you think it performs with 1.22.0
> On Wednesday 24 April 2024 at 19:27:07 UTC+1 Robert Engels wrote:
> I have a fairly stable project github.com/robaho/fixed
> <http://github.com/robaho/fixed> which is almost 100% cpu bound. It doesn’t
> change so it makes a great way to compare the performance of different Go
> versions using the same hardware. I took the time to re-run the tests today.
>
> Using 1.21.17:
>
> BenchmarkAddFixed-8 2000000000 0.59 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkAddDecimal-8 5000000 243 ns/op
> 176 B/op 8 allocs/op
>
>
> BenchmarkAddBigInt-8 100000000 14.3 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkAddBigFloat-8 20000000 78.8 ns/op
> 48 B/op 1 allocs/op
>
>
> BenchmarkMulFixed-8 300000000 4.88 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkMulDecimal-8 20000000 72.0 ns/op
> 80 B/op 2 allocs/op
>
>
> BenchmarkMulBigInt-8 100000000 17.1 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkMulBigFloat-8 30000000 35.5 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkDivFixed-8 300000000 4.71 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkDivDecimal-8 2000000 779 ns/op
> 568 B/op 21 allocs/op
>
>
> BenchmarkDivBigInt-8 30000000 46.1 ns/op
> 8 B/op 1 allocs/op
>
>
> BenchmarkDivBigFloat-8 20000000 108 ns/op
> 24 B/op 2 allocs/op
>
>
> BenchmarkCmpFixed-8 2000000000 0.38 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkCmpDecimal-8 200000000 8.05 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkCmpBigInt-8 300000000 5.87 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkCmpBigFloat-8 300000000 5.46 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkStringFixed-8 20000000 57.4 ns/op
> 32 B/op 1 allocs/op
>
>
> BenchmarkStringNFixed-8 20000000 55.6 ns/op
> 32 B/op 1 allocs/op
>
>
> BenchmarkStringDecimal-8 10000000 218 ns/op
> 64 B/op 5 allocs/op
>
>
> BenchmarkStringBigInt-8 10000000 122 ns/op
> 24 B/op 2 allocs/op
>
>
> BenchmarkStringBigFloat-8 3000000 416 ns/op
> 192 B/op 8 allocs/op
>
>
> BenchmarkWriteTo-8 30000000 45.8 ns/op
> 18 B/op 0 allocs/op
>
> and version 1.21.5:
>
> BenchmarkAddFixed-8 1000000000 0.9735 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkAddDecimal-8 14311995 69.99 ns/op
> 80 B/op 2 allocs/op
>
>
> BenchmarkAddBigInt-8 100000000 13.42 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkAddBigFloat-8 17506702 63.84 ns/op
> 48 B/op 1 allocs/op
>
>
> BenchmarkMulFixed-8 313983104 3.732 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkMulDecimal-8 18046520 66.59 ns/op
> 80 B/op 2 allocs/op
>
>
> BenchmarkMulBigInt-8 100000000 10.79 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkMulBigFloat-8 49186024 24.30 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkDivFixed-8 306888069 3.721 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkDivDecimal-8 2510688 462.4 ns/op
> 384 B/op 12 allocs/op
>
>
> BenchmarkDivBigInt-8 33993822 37.02 ns/op
> 8 B/op 1 allocs/op
>
>
> BenchmarkDivBigFloat-8 9415330 111.5 ns/op
> 24 B/op 2 allocs/op
>
>
> BenchmarkCmpFixed-8 1000000000 0.2548 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkCmpDecimal-8 168714549 7.086 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkCmpBigInt-8 234895634 4.952 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkCmpBigFloat-8 260814464 4.503 ns/op
> 0 B/op 0 allocs/op
>
>
> BenchmarkStringFixed-8 23725470 50.57 ns/op
> 24 B/op 1 allocs/op
>
>
> BenchmarkStringNFixed-8 23666628 50.67 ns/op
> 24 B/op 1 allocs/op
>
>
> BenchmarkStringDecimal-8 5665790 200.1 ns/op
> 56 B/op 4 allocs/op
>
>
> BenchmarkStringBigInt-8 10596398 100.2 ns/op
> 16 B/op 1 allocs/op
>
>
> BenchmarkStringBigFloat-8 2922332 391.2 ns/op
> 176 B/op 7 allocs/op
>
>
> BenchmarkWriteTo-8 45734523 31.53 ns/op
> 23 B/op 0 allocs/op
> which is pretty impressive across the board.
>
> Only 2 tests show any degradation and most show significant improvement.
>
> On the two that degrade, AddFixed is a fairly trivial add of 2 longs, so that
> is surprising. Strangely, WriteTo shows a different number of B/op on
> different runs (all of the other tests are stable).
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/dcaa3f55-d6f7-42cb-80c3-3fb791900f4en%40googlegroups.com
>
> <https://groups.google.com/d/msgid/golang-nuts/dcaa3f55-d6f7-42cb-80c3-3fb791900f4en%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/33FED5B3-6BD2-4BE0-8072-69A711E4A0C7%40ix.netcom.com.
