Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Jun 4, 2025

This seems to improve performance and reduce allocations:

julia> A = rand(100,100);

julia> @btime isapprox($A, $A);
  13.305 μs (3 allocations: 78.21 KiB) # master
  8.063 μs (0 allocations: 0 bytes) # this PR

julia> A = rand(5000,5000);

julia> @btime isapprox($A, $A);
  106.003 ms (3 allocations: 190.74 MiB) # master
  43.122 ms (0 allocations: 0 bytes) # this PR

Currently, this is only specialized for Arrays and contiguous views of Arrays, as these are the cases with a significant performance improvement.

@codecov
Copy link

codecov bot commented Jun 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.84%. Comparing base (0116878) to head (ef309a6).
⚠️ Report is 42 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1378      +/-   ##
==========================================
+ Coverage   93.81%   93.84%   +0.02%     
==========================================
  Files          34       34              
  Lines       15717    15723       +6     
==========================================
+ Hits        14745    14755      +10     
+ Misses        972      968       -4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jishnub jishnub force-pushed the jishnub/isapprox branch from 7457d72 to 4906add Compare June 13, 2025 15:03
@jishnub jishnub requested a review from dkarrasch September 1, 2025 20:43
Copy link
Member

@dkarrasch dkarrasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Does this have any effect on the runtime of the tests? There are probably zillions of isapprox tests, so they might add up notably.

@dkarrasch dkarrasch merged commit 35a4427 into master Sep 15, 2025
4 checks passed
@dkarrasch dkarrasch deleted the jishnub/isapprox branch September 15, 2025 07:32
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