Closed hugoabonizio closed 6 years ago
Avoid creating an intermediate array.
Running a benchmark shows this optimization converts into approximatelly 10% in performance gain on final Network#run method.
Network#run
$ crystal run --release bench.cr original 1.86M (536.63ns) (± 4.24%) 1.13× slower modified 2.11M (474.37ns) (± 4.32%) fastest
Very nice! Thanks again @hugoabonizio :)
Avoid creating an intermediate array.
Running a benchmark shows this optimization converts into approximatelly 10% in performance gain on final
Network#run
method.