-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More efficient hvcat of scalars and arrays of numbers (#39729)
First attempt to address #39713 Original: ``` const a, b, c, d = zeros(Int, 2, 2), [3 4], [2 ; 4], 5 using BenchmarkTools @Btime [a c ; b d] # 31 allocations and 1.25 kb ``` New: ``` @Btime [a c ; b d] # 15 allocations and 656 bytes ``` Others unchanged, as expected. ~~Though if different types of numbers are mixed, it still takes the longer path. I tried expanding the definition but there's some weird stuff going on that increases allocations in the other situations I posted in that issue.~~ Works for any Number element type. Fixes #39713
- Loading branch information
1 parent
3b629f1
commit f135f3a
Showing
1 changed file
with
5 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters