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

fix: better performance for labelled matrix display #3602

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Conversation

thofma
Copy link
Collaborator

@thofma thofma commented Apr 12, 2024

Current master:

julia> t = character_table("B");  # if you really want to see the formatted output then omit the semicolon

julia> @time show(IOBuffer(), "text/plain", t);
  9.962639 seconds (74.39 M allocations: 4.077 GiB, 5.35% gc time, 76.55% compilation time)

julia> @time show(IOBuffer(), "text/plain", t);
  2.275388 seconds (20.78 M allocations: 1.275 GiB, 3.93% gc time)

With this PR:

julia> t = character_table("B");  # if you really want to see the formatted output then omit the semicolon

julia> @time show(IOBuffer(), "text/plain", t);
  2.590985 seconds (8.90 M allocations: 575.139 MiB, 10.43% gc time, 95.47% compilation time)

julia> @time show(IOBuffer(), "text/plain", t);
  0.130060 seconds (1.57 M allocations: 76.671 MiB)

@thofma thofma requested a review from ThomasBreuer April 12, 2024 12:07
Copy link
Member

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

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

Nice, thanks.

src/Groups/MatrixDisplay.jl Outdated Show resolved Hide resolved
src/Groups/MatrixDisplay.jl Outdated Show resolved Hide resolved
Copy link

codecov bot commented Apr 12, 2024

Codecov Report

Merging #3602 (9376127) into master (24e629c) will increase coverage by 0.41%.
Report is 5 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3602      +/-   ##
==========================================
+ Coverage   81.75%   82.17%   +0.41%     
==========================================
  Files         573      573              
  Lines       77557    77621      +64     
==========================================
+ Hits        63407    63782     +375     
+ Misses      14150    13839     -311     
Files Coverage Δ
src/Groups/MatrixDisplay.jl 98.36% <100.00%> (+<0.01%) ⬆️

... and 42 files with indirect coverage changes

@thofma thofma merged commit 17c5ddc into master Apr 12, 2024
30 checks passed
@thofma thofma deleted the th/display branch April 12, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants