ryo-manba / ft_containers

Reimplementation of STL containers.
MIT License
0 stars 0 forks source link

[1pt]size、emptyの実行速度改善 #52

Closed ryo-manba closed 2 years ago

ryo-manba commented 2 years ago

概要

sizeはstd::distanceを使うようにリファクタしたら遅くなってしまった。 emptyもbegin()、end()をかまさない方が早いはず。

対応

sizeもemptyも直接メンバ変数にアクセスするように修正する。