[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looping through an array with FOR EACH


Il 16/01/26 00:27, Benoît Minisini ha scritto:
Better for what?

"For Each" on an array is usually slower than using a "For...To" loop with an index variable, except if you don't need the index. Check by yourself anyway according to what you need exactly.

And the JIT compiler do not optimize the "For Each" loop.

Otherwise it's not important how you browse the array.

Dear Benoit,

Thank you for the explanation and my apologies again.
As Brian wrote, a big thank you for the beautiful code you gave us.

With Best Regards
Gianluigi


References:
Looping through an array with FOR EACHGianluigi <gradobag@xxxxxxxxxxx>
Re: Looping through an array with FOR EACHBB <adamnt42@xxxxxxxxx>
Re: Looping through an array with FOR EACHGianluigi <gradobag@xxxxxxxxxxx>
Re: Looping through an array with FOR EACHBrian G <brian@xxxxxxxxxxxxxxxx>
Re: Looping through an array with FOR EACHGianluigi <gradobag@xxxxxxxxxxx>
Re: Looping through an array with FOR EACHBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Looping through an array with FOR EACHGianluigi <gradobag@xxxxxxxxxxx>
Re: Looping through an array with FOR EACHBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>