You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support reserve like std::vector<T>::reserve in C++ #2232
It looks like reserve makes a big difference here, so we should support it in LPython as well. For example by from lpython import reserve and just call this function. The CPython implementation will not do anything.
In CPython emulation this will be an empty function (no-op), in LPython we reserve the memory for this list, similar to reserve in C++, for performance.
changed the title [-]Support `list_reserve` like `std::vector<T>::reserve` in C++[/-][+]Support `reserve` like `std::vector<T>::reserve` in C++[/+]on Jul 30, 2023
Activity
czgdp1807 commentedon Jul 30, 2023
@kabra1110 Please keep it a high priority so that we can benchmark it against equivalent C++ code in #2231.
certik commentedon Jul 30, 2023
Duplicate of #2233.
[-]Support `list_reserve` like `std::vector<T>::reserve` in C++[/-][+]Support `reserve` like `std::vector<T>::reserve` in C++[/+]