If you want it to look nice and are running on 0.4, just switching to

slice(A, 1:n, k) ↔ slice(A, 1:n, λ)

should also get you a performance boost (especially for large matrices). 
Obviously you could do even better by devectorizing, but it wouldn't be as 
pretty.

Off-topic, but your use of unicode for this is very elegant, and eye-opening 
for me.

Best,
--Tim

On Wednesday, March 25, 2015 09:24:09 AM Matt Bauman wrote:
> The swap could be done without temporaries, but I assume you're also trying
> to match the look of the pseudocode?
> 
> On Wednesday, March 25, 2015 at 11:22:41 AM UTC-4, Jiahao Chen wrote:
> > Here is some code I wrote for completely pivoted LU factorizations.
> > Can you make it even faster?
> > 
> > Anyone who can demonstrate verifiable speedups (or find bugs relative
> > to the textbook description) while sticking to pure Julia code wins an
> > acknowledgment in an upcoming paper I'm writing about Julia, and a
> > small token of my appreciation with no cash value. :)
> > 
> > Reference: G. H. Golub and C. F. Van Loan, Matrix Computations 4/e,
> > Algorithm 3.4.3, p. 132.
> > 
> > Thanks,
> > 
> > Jiahao Chen
> > Staff Research Scientist
> > MIT Computer Science and Artificial Intelligence Laboratory

Reply via email to