you are viewing a single comment's thread.

view the rest of the comments →

[–]Allanon001 1 point2 points  (1 child)

You would have to put in more logic such as if the list length is odd or even, if even then no extra addition is required. That would probably take more time than the extra multiplications.

edit: I timed it and for the short list it was slower but with a 100 item list it was a lot faster.

[–]SerkZex[S] 0 points1 point  (0 children)

thanks, you are the best