You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this line of code, it will always update the value of widths[index], even if the value of it does not change. This introduces some redundant operations.
If we change the code to this, we can eliminate these redundant operations.
if widths[index] < cell.width{
widths[index] = cell.width;
}
According to my tests, the average execution time decreased from 6.5s to 4.8s, which is a 1.37x speedup.
Hope this information helps!
The text was updated successfully, but these errors were encountered:
rust-term-grid/src/lib.rs
Line 319 in 1cbc10f
For this line of code, it will always update the value of widths[index], even if the value of it does not change. This introduces some redundant operations.
If we change the code to this, we can eliminate these redundant operations.
According to my tests, the average execution time decreased from 6.5s to 4.8s, which is a 1.37x speedup.
Hope this information helps!
The text was updated successfully, but these errors were encountered: