Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stable_hash usage to 1.0 #3213

Closed

Conversation

haberdashPI
Copy link
Contributor

Description

This upgrades StableHashTraits to 1.0 and revises its usage accordingly.

Type of change

Delete options that do not apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • Added an entry in NEWS.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

@SimonDanisch
Copy link
Member

SimonDanisch commented Sep 6, 2023

Thank you!
Any idea how to fix the performance regression?
This PR:

path = Makie.bezier_star(8, 0.33, 0.6, pi/2
julia> @btime Makie.StableHashTraits.stable_hash(path; alg=Makie.crc)
  131.000 μs (4977 allocations: 254.51 KiB)
julia> @btime Makie.StableHashTraits.stable_hash(('c', Makie.FreeTypeAbstraction.fontname(Makie.defaultfont())); alg=Makie.crc)
  2.511 μs (100 allocations: 5.20 KiB)

Master:

julia> @btime Makie.StableHashTraits.stable_hash(path)
  5.733 μs (366 allocations: 16.54 KiB)
julia> @btime Makie.StableHashTraits.stable_hash(('c', Makie.FreeTypeAbstraction.fontname(Makie.defaultfont())))
  695.652 ns (28 allocations: 1.30 KiB)

@haberdashPI
Copy link
Contributor Author

The new version is slower, so this may just be the timings you get with the updates.

I have some performance improvements in the works: (see beacon-biosignals/StableHashTraits.jl#29 and beacon-biosignals/StableHashTraits.jl#30), which should land as a part of v1.1.

@SimonDanisch
Copy link
Member

Merged in #3216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants