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

improve latency: specify element type explicitly in each comprehension #314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nsajko
Copy link

@nsajko nsajko commented Dec 30, 2024

This improves latency a bit.

This improves latency a bit. The real motivation is as a prerequisite
for potential future PRs: specifing the eltype explicitly could allow
things like disabling inference, which should provide greater latency
improvements.
@nsajko
Copy link
Author

nsajko commented Dec 30, 2024

Script for timing test_all on an empty package:

using Test: @testset
using Aqua: Aqua
using Brick: Brick  # empty package
@timev @testset "test set" begin
    Aqua.test_all(Brick)
end

Experiment is run like so:

  • with Julia v1.11.2
  • with all packages precompiled beforehand
  • in a noninteractive session, by specifying the script file name on the command-line

Results on Git master branch:

Test Summary: | Pass  Total  Time
test set      |   11     11  7.4s
  7.580602 seconds (5.57 M allocations: 319.143 MiB, 1.10% gc time, 37.78% compilation time)
elapsed time (ns):  7.580601886e9
gc time (ns):       83028137
bytes allocated:    334646112
pool allocs:        5562994
non-pool GC allocs: 1567
malloc() calls:     3955
free() calls:       3819
minor collections:  5
full collections:   0

Results on PR branch:

Test Summary: | Pass  Total  Time
test set      |   11     11  7.1s
  7.238491 seconds (5.09 M allocations: 295.169 MiB, 1.33% gc time, 35.07% compilation time)
elapsed time (ns):  7.238490548e9
gc time (ns):       96283002
bytes allocated:    309506936
pool allocs:        5082786
non-pool GC allocs: 1546
malloc() calls:     3561
free() calls:       2783
minor collections:  3
full collections:   1

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.90%. Comparing base (1fca5d9) to head (7d9293b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #314   +/-   ##
=======================================
  Coverage   74.90%   74.90%           
=======================================
  Files          11       11           
  Lines         761      761           
=======================================
  Hits          570      570           
  Misses        191      191           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nsajko
Copy link
Author

nsajko commented Dec 30, 2024

Am I supposed to honor the automatic code style suggestions? Seems like that would unnecessarily increase diff size of the PR.

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.

1 participant