Revision 8ccf78ba24aa42e949233aba65c89f48aac08a01 authored by Nathan Daly on 10 April 2024, 16:21:08 UTC, committed by Nathan Daly on 10 April 2024, 16:25:30 UTC
Since we were already specializing in for Tuples anyway, we should be generating code that can take advantage of the tuple type, rather than doing a generic, type-unstable traversal. Before: ```julia julia> @btime Base.in($(5), (1, 2.0, 3, "hey", 5.2)) 53.541 ns (6 allocations: 224 bytes) false ``` After: ```julia julia> @btime Base.in($(5), (1, 2.0, 3, "hey", 5.2)) 1.666 ns (0 allocations: 0 bytes) false ``` The new code statically unrolls the tuple comparisons, and thus also compiles away any of the comparisons that are statically known to be not equal, such as the `==(::Int, ::String)` comparison for element 4 in the example above.
1 parent e9a24d4
File | Mode | Size |
---|---|---|
.devcontainer | ||
.github | ||
base | ||
cli | ||
contrib | ||
deps | ||
doc | ||
etc | ||
src | ||
stdlib | ||
test | ||
.buildkite-external-version | -rw-r--r-- | 5 bytes |
.clang-format | -rw-r--r-- | 3.3 KB |
.clangd | -rw-r--r-- | 114 bytes |
.codecov.yml | -rw-r--r-- | 52 bytes |
.git-blame-ignore-revs | -rw-r--r-- | 371 bytes |
.gitattributes | -rw-r--r-- | 65 bytes |
.gitignore | -rw-r--r-- | 571 bytes |
.mailmap | -rw-r--r-- | 12.7 KB |
CITATION.bib | -rw-r--r-- | 513 bytes |
CITATION.cff | -rw-r--r-- | 1012 bytes |
CONTRIBUTING.md | -rw-r--r-- | 23.4 KB |
HISTORY.md | -rw-r--r-- | 388.0 KB |
LICENSE.md | -rw-r--r-- | 1.3 KB |
Make.inc | -rw-r--r-- | 56.4 KB |
Makefile | -rw-r--r-- | 30.4 KB |
NEWS.md | -rw-r--r-- | 4.4 KB |
README.md | -rw-r--r-- | 7.4 KB |
THIRDPARTY.md | -rw-r--r-- | 3.9 KB |
VERSION | -rw-r--r-- | 11 bytes |
julia.spdx.json | -rw-r--r-- | 37.8 KB |
pkgimage.mk | -rw-r--r-- | 1.4 KB |
sysimage.mk | -rw-r--r-- | 4.2 KB |
typos.toml | -rw-r--r-- | 78 bytes |
Computing file changes ...