09-20-2023, 03:25 PM
1. Oh my! That's an interesting developer story. That's for sharing it with me. As users of this great tool (I'm a beginner to Curvy) we are lucky you continued its development. Thank you!
2. Yes the enumerator is an allocation but in your version, there is the extra array creation so it counts as an allocation too. I suspect that Concat version should be less expensive (just a little bit) but we can't know without proper testing. It's not a big deal anyways. I just wanted to share how I would avoid resizing arrays. Thanks for the consideration.
3. AddRange creates 1 array (while resizing) if I'm not mistaken.
4. When VS introduced this feature for the first time, I immediately disabled it. Really don't like the idea. After some time, I wanted to give it a chance and I started to like it. Then this AddRange incident happened. Actually IndexOf happened first but I didn't even notice it until AddRange incident. Now I'm considering disabling it again
Thank you for everything, especially for the friendly chat!
2. Yes the enumerator is an allocation but in your version, there is the extra array creation so it counts as an allocation too. I suspect that Concat version should be less expensive (just a little bit) but we can't know without proper testing. It's not a big deal anyways. I just wanted to share how I would avoid resizing arrays. Thanks for the consideration.
3. AddRange creates 1 array (while resizing) if I'm not mistaken.
4. When VS introduced this feature for the first time, I immediately disabled it. Really don't like the idea. After some time, I wanted to give it a chance and I started to like it. Then this AddRange incident happened. Actually IndexOf happened first but I didn't even notice it until AddRange incident. Now I'm considering disabling it again
Thank you for everything, especially for the friendly chat!