-
-
Notifications
You must be signed in to change notification settings - Fork 16
deprecate repmat() ? #402
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
Comments
julia> using BenchmarkTools
julia> for N in (10, 50, 100)
A = rand(N, N)
outer = (N, N)
@btime repmat($A, $N, $N)
@btime repeat($A, outer = $outer)
end
11.313 μs (202 allocations: 84.45 KiB)
10.518 ms (119017 allocations: 3.11 MiB)
5.407 ms (5002 allocations: 47.84 MiB)
7.397 s (79971519 allocations: 1.98 GiB)
106.325 ms (20002 allocations: 763.55 MiB)
112.596 s (1294889019 allocations: 31.96 GiB) |
As a temporary solution, could repmat be deprecated, and a fast path added that uses the current repmat code when applicable? |
|
Would the return type be inferrable if we only allowed tuples as arguments for |
Yes, with those constraints one could make it inferrable. |
This discussion already happened at JuliaLang/julia#12953 and JuliaLang/julia#14082, and it was decided to keep keyword arguments. |
Closed by JuliaLang/julia#26039 |
given
repeat
, shouldrepmat
be deprecated? the latter cannot handle more than 2 dimensions, and does not have the flexibility provided by the former's inner argument. happy to draft a PR if there is consensus.The text was updated successfully, but these errors were encountered: