Performance of containers .at() method

Discussion about recent product features & solutions!
2 posts • Page 1 of 1
dvribeira
Posts:24
Joined: Mon Mar 18, 2019 11:53 am

Performance of containers .at() method

Post by dvribeira »

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

dvribeira
Posts:24
Joined: Mon Mar 18, 2019 11:53 am

Re: Performance of containers .at() method

Post by dvribeira »

Same performance issue seems to happen for .count() against dynlen(), and I guess probably other methods.

2 posts • Page 1 of 1