Skip to content

Conversation

@MichaelChirico
Copy link

  • Hard-encode integers where appropriate (1 -> 1L)
  • Pre-declare & store inner nested loop indices (rather than declare 1:n each pass)
  • as.matrix extraneous -- see e.g. print(outer) which uses as.vector (and LHS and RHS are already vectors)
  • Repeated assignment in R (x <- y <- z <- w <- v <- u <- t <- 2) creates copies; no worry about pointers/referenced overwrites
  • Pre-transpose mTransition

 - Hard-encode integers where appropriate (`1` -> `1L`)
 - Pre-declare & store inner nested loop indices (rather than declare `1:n` each pass)
 - `as.matrix` extraneous -- see e.g. `print(outer)` which uses `as.vector` (and LHS and RHS are already vectors)
 - Repeated assignment in R (`x <- y <- z <- w <- v <- u <- t <- 2`) creates copies; no worry about pointers/referenced overwrites
 - Pre-transpose `mTransition`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant