Zip vs Enumerate

Dukc ajieskola at gmail.com
Wed Jun 20 05:49:15 UTC 2018


On Wednesday, 20 June 2018 at 03:44:58 UTC, Jordan Wilson wrote:
> Is there anything I can do to improve zip, before I go ahead 
> and change to the faster but slightly less readable enumerate?

The problem might be that zip checks both arrays for empty during 
each step, enumerate only the first one. Try appending 
takeExactly(1000) on the result of zip. It might be even faster 
than enumerate.


More information about the Digitalmars-d-learn mailing list