Performing some tests I found out that it takes about twice the time to access an array element (tested with dyn_int) with the at method compared to the subscript operator []. However they seem to be doing more or less the same thing, including bound checks both of them. This is not a critical issue at all but I wanted to draw attention to it in case this performance could be easily improved to be closer to the subscript operator.
Kind regards,
Daniel
Performance of containers .at() method
- dvribeira
- Posts:24
- Joined: Mon Mar 18, 2019 11:53 am
Re: Performance of containers .at() method
Same performance issue seems to happen for .count() against dynlen(), and I guess probably other methods.