Here are some things you might try: (1) Don’t use a global const. Pass N as an argument to all functions.
(2) Use in-place multiplication via functions like A_mul_B! in lines like `@inbounds a = dot(W[:,n], state)`. In Julia 0.3, W[:,n] creates a copy of that column of W on every iteration. (3) Don’t make full copies of state in lines like `@inbounds samples[:,i] = copy(state)`. Do explicit elementwise copying, which is much cheaper. — John On Aug 13, 2014, at 9:14 PM, Andrew Wrigley <[email protected]> wrote: > <gibbstiming.jl>
