Rethinking how technology uses our personal data
thecloudfall.com6 pointsby raphael_kimmig0 comments
zip(arr[::3], arr[1::3], arr[2::3])
which is nearly as fast but doesn't work with iterators.
If you want to use iterators you could also do zip(islice(arr, 0, None, 3), islice(arr, 1, None, 3), islice(arr, 2, None, 3))
which is a tad slower. $ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
$ ruby bench_neural_net.rb
ruby bench_neural_net.rb 17,74s user 0,02s system 99% cpu 17,771 total
$ bin/topaz bench_neural_net.rb
bin/topaz bench_neural_net.rb 3,43s user 0,03s system 99% cpu 3,466 total
I’m not quite sure I understand where the hot water is added, but I like not having a boiler.