19 ms·
Depends whether they cut their teeth on Matlab! I'm not sure which is faster here, often writing out the loop is a little faster but less compact.
by improbable22 8y ago
Depends whether they cut their teeth on Matlab!
I'm not sure which is faster here, often writing out the loop is a little faster but less compact.
- KenoFischer 8y agoThey're equally fast: julia> @btime fact_prod(10000) 7.833 μs (0 allocations: 0 bytes) julia> @btime fact_loop(10000) 7.908 μs (0 allocations: 0 bytes)