Write to elements of the list
This test is almost the same as the previous one, but this time each element of the collection is modified by incrementing one of its field.
Let’s see if the results are different this time.
The results are more stable than before. We can see that the normal mode is leading the results by a bit less than 30%. Just like for iteration, there no real difference between the different modes.
Let’s increase the data size by a bit:
The results are the same, still 30% better for the intrusive version.
Bigger data type again:
This time, the intrusive version is not faster anymore than the standard list.
We have seen that when write is made to the data, intrusive list are better than list. The margin is higher than when doing only iteration.