JuliaDynamics / ComplexityMeasures.jl

Estimators for probabilities, entropies, and other complexity measures derived from data in the context of nonlinear dynamics and complex systems
MIT License
48 stars 11 forks source link

Faster normal cdf encoding #399

Closed kahaaga closed 2 months ago

kahaaga commented 2 months ago

Fixes #397.

Benchmarks

Before:

julia> using BenchmarkTools

julia> using Random; rng = MersenneTwister(1234); x = randn(rng, 10000);

julia> @btime entropy(Dispersion(c = 5, m = 2), x) setup = (x = randn(rng, 10000))
  15.013 ms (20056 allocations: 3.82 MiB)
4.641795100667297

After:

julia> @btime entropy(Dispersion(c = 5, m = 2), x) setup = (x = randn(rng, 10000))
  778.209 μs (60 allocations: 316.88 KiB)
4.642120868408472