Skip to content

circshift is not performant #17581

@JeffreySarnoff

Description

@JeffreySarnoff
using BenchmarkTools
v = [i for i=1:4];
W = [v v v v];

bench_det = @benchmarkable( det(W) ) ;tune!(bench_det); run(bench_det)
BenchmarkTools.Trial: 
  samples:          10000
  evals/sample:     195
  time tolerance:   5.00%
  memory tolerance: 1.00%
  memory estimate:  848.00 bytes
  allocs estimate:  12
  minimum time:     484.00 ns (0.00% GC)
  median time:      506.00 ns (0.00% GC)
  mean time:        683.73 ns (11.35% GC)
  maximum time:     27.55 μs (0.00% GC)

bench_cshift = @benchmarkable( circshift(v,2) ); tune!(bench_cshift); run(bench_cshift)
BenchmarkTools.Trial: 
  samples:          10000
  evals/sample:     194
  time tolerance:   5.00%
  memory tolerance: 1.00%
  memory estimate:  640.00 bytes
  allocs estimate:  10
  minimum time:     493.00 ns (0.00% GC)
  median time:      519.00 ns (0.00% GC)
  mean time:        632.77 ns (9.90% GC)
  maximum time:     27.16 μs (0.00% GC)

uncovered by Michael Prange: https://groups.google.com/forum/#!topic/julia-users/yOFYiNPtWWw

issue submitted at the suggestion of @StefanKarpinski

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIndicates a good issue for first-time contributors to JuliaperformanceMust go faster

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions