JuliaSIMD / JuliaSIMD/VectorizedRNG.jl

Bad NEON performance

Open
#20 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
36
Forks
7
PR merge metrics
No merged PRs in 30d

Description

```julia
julia> using VectorizedRNG, Random

julia> x = Vector{Float64}(undef, 1024);

julia> @benchmark randn!(local_rng(), $x)
BenchmarkTools.Trial: 10000 samples with 9 evaluations.
Range (min … max): 2.838 μs … 4.028 μs ┊ GC (min … max): 0.00% … 0.00%
Time (median): 2.852 μs ┊ GC (median): 0.00%
Time (mean ± σ): 2.862 μs ± 72.118 ns ┊ GC (mean ± σ): 0.00% ± 0.00%

█▄
▃███▅▄▂▂▂▂▁▁▁▁▂▁▁▁▁▂▁▁▁▁▁▁▂▁▂▁▁▂▁▂▂▁▂▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▂▂ ▂
2.84 μs Histogram: frequency by time 3.16 μs <

Memory estimate: 0 bytes, allocs estimate: 0.

julia> @benchmark randn!(Random.default_rng(), $x)
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
Range (min … max): 1.533 μs … 6.983 μs ┊ GC (min … max): 0.00% … 0.00%
Time (median): 1.688 μs ┊ GC (median): 0.00%
Time (mean ± σ): 1.693 μs ± 77.624 ns ┊ GC (mean ± σ): 0.00% ± 0.00%

▂ ▇▂▂▂▇▅▂▂▁█▁▁ ▄
▂▁▁▁▂▂▂▂▂▂▂▂▃▃▃▃▆▄▅▅█▇████████████████▆▆▅▇▄▄▃▄▃▃▃▃▂▂▂▂▂▂▂▂ ▄
1.53 μs Histogram: frequency by time 1.83 μs <

Memory estimate: 0 bytes, allocs estimate: 0.

julia> @benchmark rand!(local_rng(), $x)
BenchmarkTools.Trial: 10000 samples with 146 evaluations.
Range (min … max): 698.918 ns … 8.839 μs ┊ GC (min … max): 0.00% … 0.00%
Time (median): 700.630 ns ┊ GC (median): 0.00%
Time (mean ± σ): 707.420 ns ± 120.934 ns ┊ GC (mean ± σ): 0.00% ± 0.00%

▄█▇▄ ▄▄▁ ▂
█████▇▆▆▆▄▅▄▆▅▆▆▆▆▅▅▅████▆▆▇█▅▆▆▄▆▆▆▆▇▆▅▄▁▁▄▅▅▄▅▄▄▅▆▅▅▄▃▆▅▅▄▅ █
699 ns Histogram: log(frequency) by time 755 ns <

Memory estimate: 0 bytes, allocs estimate: 0.

julia> @benchmark rand!(Random.default_rng(), $x)
BenchmarkTools.Trial: 10000 samples with 152 evaluations.
Range (min … max): 682.566 ns … 949.836 ns ┊ GC (min … max): 0.00% … 0.00%
Time (median): 683.664 ns ┊ GC (median): 0.00%
Time (mean ± σ): 687.544 ns ± 11.115 ns ┊ GC (mean ± σ): 0.00% ± 0.00%

██▅▃▁ ▃▄ ▁▁ ▁
██████▇▇▇▇▇▆▅▆▆▅▆▄▅▄▄████▅▅▅███▇▆▅▆▆▆▆▆▅▅▃▄▄▄▄▄▅▂▄▅▃▅▂▄▅▄▄▄▅▅ █
683 ns Histogram: log(frequency) by time 735 ns <

Memory estimate: 0 bytes, allocs estimate: 0.

julia> versioninfo()
Julia Version 1.9.0-DEV.1073
Commit 0b9eda116d* (2022-08-01 14:27 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.5.0)
CPU: 8 × Apple M1
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.