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

JuliaLang / julia / #38043 / 1
77%
master: 77%

Build:
DEFAULT BRANCH: master
Ran 12 Apr 2025 08:27AM UTC
Files 212
Run time 5s
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

12 Apr 2025 06:53AM UTC coverage: 19.945% (-0.3%) from 20.228%
#38043.1

push

local

web-flow
Eagerly evaluate indices in `eachindex` check (#58054)

This reduces TTFX in `eachindex` calls with multiple arguments, with
minimal impact on performance. Much of the latency comes from the error
path, and specializing it for the common case of 2 arguments helps a lot
with reducing latency. In this, I've also unrolled the `join` in the
error path, and we recursively generate a `LazyString`s instead. This
helps in reducing TTFX for a longer list of arguments.

```julia
julia> a = zeros(2,2);

julia> @time eachindex(a, a);
  0.046902 seconds (128.39 k allocations: 6.652 MiB, 99.93% compilation time) # nightly
  0.015368 seconds (19.91 k allocations: 1.048 MiB, 99.79% compilation time) # this PR

julia> @btime eachindex($a, $a, $a, $a, $a, $a, $a, $a);
  6.945 ns (0 allocations: 0 bytes) # nightly
  6.855 ns (0 allocations: 0 bytes) # this PR
```
This reduces TTFX for a longer list of arguments as well:
```julia
julia> @time eachindex(a, a, a, a, a, a, a, a);
  0.052552 seconds (196.87 k allocations: 10.068 MiB, 99.53% compilation time) # nightly
  0.043401 seconds (69.13 k allocations: 3.454 MiB, 99.34% compilation time) # this PR
```
For Cartesian indexing,
```julia
julia> a = zeros(2,2);

julia> v = view(a, 1:2, 1:2);

julia> @time eachindex(a, v);
  0.051333 seconds (171.34 k allocations: 8.921 MiB, 99.94% compilation time) # nightly
  0.016340 seconds (26.95 k allocations: 1.405 MiB, 99.79% compilation time) # this PR

julia> @btime eachindex($a, $v, $a, $v, $a, $v, $a, $v);
  9.339 ns (0 allocations: 0 bytes) # nightly
  9.357 ns (0 allocations: 0 bytes) # this PR
```

9861 of 49441 relevant lines covered (19.94%)

98617.35 hits per line

Source Files on job #38043.1
  • Tree
  • List 212
  • Changed 15
  • Source Changed 0
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 38043
  • a690758d on github
  • Prev Job for on master (##38042.1)
  • Next Job for on master (##38044.1)
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

© 2026 Coveralls, Inc