Lilith Orion Hafner

Results 181 issues of Lilith Orion Hafner

Ideally, we would dispatch to the new method for any efficient iterable that can be iterated twice; the closest type I could find was `AbstractVector`. Benchmarking code: ```julia using BenchmarkTools...

performance
collections

Bitsets now have offsets which makes this test efficient.

test

This PR eliminates all three current uses of `sort` in the compiler by merging PRs for the first two and inlining the third use. - make pending_perm a heap instead...

needs tests
needs docs
needs news
excision
sort

```julia-repl julia> using BenchmarkTools julia> @btime invoke(BitSet, Any, x) setup=(x=rand(1:10_000, 10)); Internal error: encountered unexpected error in runtime: TypeError(func=:specializations, context="", expected=DataType, got=Union{}) ijl_type_error_rt at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib (unknown line) ijl_type_error at /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.9.dylib...

bug

`getindex` on structural zeros uses `zero(T)`. `setindex!`, `dropzeros!`, and `==` use `iszero(T)`. It would be nice to know which operations are required for full functionality for SparseArrays, and what subset...

documentation

- assign on `mysparsearray[index] = v` whenever `v !== zero(eltype(sparsecollection))` - stop prohibiting `reinterpret` Similar to @StefanKarpinski's suggestion [here](https://github.com/JuliaSparse/SparseArrays.jl/discussions/69#discussioncomment-1980166) Fixes #289 Fixes #294 Fixes #304 Fixes #305 The primary motivation...

```julia julia> x = sprand(10, .1) 10-element SparseVector{Float64, Int64} with 1 stored entry: [3 ] = 0.850332 julia> sort!(x) 10-element SparseVector{Float64, Int64} with 8 stored entries: [3 ] = 0.0...

performance

This is a problem on both 1.8.3 and nightly: ```julia julia> using SparseArrays julia> s = spzeros(30, 5); for i in eachindex(s); if rand() < .4; s[i] = 1; s[i]...

bug

```julia julia> sort!(sprand(1000, 1000, .01), dims=1) ERROR: `reinterpret` on sparse arrays is discontinued. Try reinterpreting the value itself instead. Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] reinterpret(#unused#::Type, A::SparseVector{Float64, Int64}) @...

bug

For almost any value and assignable expression in Julia, this holds: ```julia expr = value @assert expr === value ``` I wish this held, too: ```julia v = spzeros(1) value...