https://github.com/JuliaLang/julia
Revision a7d446bf95b7811476961f8adfb6c69bebfefa50 authored by Jakob Nybo Nissen on 12 October 2022, 06:33:38 UTC, committed by GitHub on 12 October 2022, 06:33:38 UTC
PR #45924 fixed length of `Stateful`, but this change requires `Stateful` to call
`length` on its wrapped iterator on instantiation.
The current implementation of `cmp(::AbstractString, ::AbstractString)` wraps the
strings in `Stateful` to efficiently check if one string is longer than the other
without needing an O(N) call to `length`.
However, with #45924 this length call is done anyway, which led to a performance
regression.

In this PR, the `cmp` method is changed so it no longer relies on `Stateful` to do
the same thing.

Fix #46719
1 parent 9104c20
History
Tip revision: a7d446bf95b7811476961f8adfb6c69bebfefa50 authored by Jakob Nybo Nissen on 12 October 2022, 06:33:38 UTC
Do not use `Stateful` for `cmp` of `AbstractString` (#47125)
Tip revision: a7d446b
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
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 294 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 493 bytes
.mailmap -rw-r--r-- 12.1 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 23.3 KB
HISTORY.md -rw-r--r-- 349.9 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 50.2 KB
Makefile -rw-r--r-- 27.5 KB
NEWS.md -rw-r--r-- 8.3 KB
README.md -rw-r--r-- 7.3 KB
THIRDPARTY.md -rw-r--r-- 3.7 KB
VERSION -rw-r--r-- 10 bytes
julia.spdx.json -rw-r--r-- 35.8 KB
sysimage.mk -rw-r--r-- 4.1 KB

README.md

back to top