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

Add StackPrimitive Class/Struct Generator #30

Closed
SoftStoneDevelop opened this issue Aug 28, 2022 · 1 comment
Closed

Add StackPrimitive Class/Struct Generator #30

SoftStoneDevelop opened this issue Aug 28, 2022 · 1 comment

Comments

@SoftStoneDevelop
Copy link
Owner

Because: Generic is slow

@SoftStoneDevelop SoftStoneDevelop changed the title Add StackPromitive Class/Struct Generator Add StackPrimitive Class/Struct Generator Aug 28, 2022
Repository owner locked as resolved and limited conversation to collaborators Aug 28, 2022
Repository owner unlocked this conversation Aug 28, 2022
@SoftStoneDevelop
Copy link
Owner Author

BenchmarkDotNet=v0.13.2, OS=Windows 10 (10.0.19044.1889/21H2/November2021Update)
AMD Ryzen Threadripper 3970X, 1 CPU, 64 logical and 32 physical cores
.NET SDK=6.0.400
  [Host]   : .NET 6.0.8 (6.0.822.36306), X64 RyuJIT AVX2
  .NET 6.0 : .NET 6.0.8 (6.0.822.36306), X64 RyuJIT AVX2

Job=.NET 6.0  Runtime=.NET 6.0  
Method Size Mean Ratio Allocated
StackOfInt32 100 362.6 ns 0.93 -
Stack<int> 100 391.2 ns 1.00 -
StackOfInt32 1000 2,922.6 ns 0.99 -
Stack<int> 1000 2,940.5 ns 1.00 -
StackOfInt32 10000 28,535.9 ns 1.00 -
Stack<int> 10000 28,634.1 ns 1.00 -
StackOfInt32 100000 300,406.5 ns 1.00 -
Stack<int> 100000 300,773.5 ns 1.00 -
StackOfInt32 250000 724,108.8 ns 0.96 -
Stack<int> 250000 757,929.6 ns 1.00 1 B
StackOfInt32 500000 1,741,689.5 ns 0.99 1 B
Stack<int> 500000 1,750,591.6 ns 1.00 1 B
StackOfInt32 1000000 3,473,804.2 ns 1.01 2 B
Stack<int> 1000000 3,436,813.6 ns 1.00 4 B
BenchmarkDotNet=v0.13.2, OS=Windows 10 (10.0.19044.1889/21H2/November2021Update)
AMD Ryzen Threadripper 3970X, 1 CPU, 64 logical and 32 physical cores
.NET SDK=6.0.400
  [Host]   : .NET 6.0.8 (6.0.822.36306), X64 RyuJIT AVX2
  .NET 6.0 : .NET 6.0.8 (6.0.822.36306), X64 RyuJIT AVX2

Job=.NET 6.0  Runtime=.NET 6.0  
Method Size Mean Ratio Allocated
StackOfInt32 100 54.50 μs 0.90 -
Stack<int> 100 60.39 μs 1.00 -
StackOfInt32 1000 518.54 μs 0.98 -
Stack<int> 1000 528.34 μs 1.00 1 B
StackOfInt32 10000 5,164.10 μs 0.99 4 B
Stack<int> 10000 5,211.05 μs 1.00 7 B
StackOfInt32 100000 52,065.40 μs 1.00 48 B
Stack<int> 100000 52,321.01 μs 1.00 150 B
StackOfInt32 250000 130,913.04 μs 1.00 558 B
Stack<int> 250000 131,042.00 μs 1.00 614 B
StackOfInt32 500000 260,797.32 μs 0.99 1116 B
Stack<int> 500000 262,516.29 μs 1.00 2180 B
StackOfInt32 1000000 523,723.08 μs 1.00 11224 B
Stack<int> 1000000 524,802.33 μs 1.00 3792 B

Repository owner locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant