• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37920
77%

Build:
DEFAULT BRANCH: master
Ran 01 Oct 2024 10:49AM UTC
Jobs 1
Files 361
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Oct 2024 04:43AM UTC coverage: 87.726% (+1.5%) from 86.232%
#37920

push

local

web-flow
Limit `@inbounds` to indexing in the dual-iterator branch in `copyto_unaliased!` (#55919)

This simplifies the `copyto_unalised!` implementation where the source
and destination have different `IndexStyle`s, and limits the `@inbounds`
to only the indexing operation. In particular, the iteration over
`eachindex(dest)` is not marked as `@inbounds` anymore. This seems to
help with performance when the destination uses Cartesian indexing.
Reduced implementation of the branch:
```julia
function copyto_proposed!(dest, src)
    axes(dest) == axes(src) || throw(ArgumentError("incompatible sizes"))
    iterdest, itersrc = eachindex(dest), eachindex(src)
    for (destind, srcind) in zip(iterdest, itersrc)
        @inbounds dest[destind] = src[srcind]
    end
    dest
end

function copyto_current!(dest, src)
    axes(dest) == axes(src) || throw(ArgumentError("incompatible sizes"))
    iterdest, itersrc = eachindex(dest), eachindex(src)
    ret = iterate(iterdest)
    @inbounds for a in src
        idx, state = ret::NTuple{2,Any}
        dest[idx] = a
        ret = iterate(iterdest, state)
    end
    dest
end

function copyto_current_limitinbounds!(dest, src)
    axes(dest) == axes(src) || throw(ArgumentError("incompatible sizes"))
    iterdest, itersrc = eachindex(dest), eachindex(src)
    ret = iterate(iterdest)
    for isrc in itersrc
        idx, state = ret::NTuple{2,Any}
        @inbounds dest[idx] = src[isrc]
        ret = iterate(iterdest, state)
    end
    dest
end
```
```julia
julia> a = zeros(40000,4000); b = rand(size(a)...);

julia> av = view(a, UnitRange.(axes(a))...);

julia> @btime copyto_current!($av, $b);
  617.704 ms (0 allocations: 0 bytes)

julia> @btime copyto_current_limitinbounds!($av, $b);
  304.146 ms (0 allocations: 0 bytes)

julia> @btime copyto_proposed!($av, $b);
  240.217 ms (0 allocations: 0 bytes)

julia> versioninfo()
Julia Version 1.12.0-DEV.1260
Commit 4a4ca9c8152 (2024-09-28 01:49 UTC)
Build Info:
  Official https://julialan... (continued)

2 of 2 new or added lines in 1 file covered. (100.0%)

1045 existing lines in 21 files now uncovered.

78714 of 89727 relevant lines covered (87.73%)

16568013.59 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
76.35
46.68% stdlib/Printf/src/Printf.jl
1
91.59
-0.19% base/iterators.jl
2
94.34
-0.94% base/compiler/typeutils.jl
3
68.02
-1.74% base/Base.jl
3
78.26
-13.04% base/locks-mt.jl
6
48.57
0.0% base/options.jl
7
90.25
-1.18% base/compiler/ssair/show.jl
10
60.0
-33.75% stdlib/TOML/src/TOML.jl
10
94.37
0.09% base/compiler/ssair/inlining.jl
15
87.83
-0.1% base/show.jl
16
72.58
0.0% base/compiler/types.jl
31
86.53
0.17% base/compiler/ssair/ir.jl
35
87.62
0.08% base/compiler/ssair/irinterp.jl
58
81.34
0.89% base/compiler/inferencestate.jl
70
59.31
-0.08% base/compiler/ssair/verify.jl
81
86.03
-1.38% base/compiler/typeinfer.jl
99
86.35
-0.75% base/compiler/ssair/passes.jl
104
90.69
1.01% base/compiler/tfuncs.jl
110
67.7
-1.53% base/precompilation.jl
142
93.53
1.68% base/compiler/abstractinterpretation.jl
241
76.03
0.64% base/loading.jl
Jobs
ID Job ID Ran Files Coverage
1 #37920.1 01 Oct 2024 10:49AM UTC 361
87.73
Source Files on build #37920
  • Tree
  • List 361
  • Changed 282
  • Source Changed 0
  • Coverage Changed 67
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 06e7b9d2 on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc