Perl-Sensitive Sunglasses | |
PerlMonks |
Re^4: Kronecker Productby choroba (Cardinal) |
on Jun 21, 2022 at 12:32 UTC ( [id://11144900]=note: print w/replies, xml ) | Need Help?? |
Nice! Interestingly, for this input, the pure Perl solution if faster than my PDL one. But if you make the matrices larger, e.g. already 3x5 and 4x5 makes PDL the fastest, as it scales the best.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|