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
If these sort of function calls do not get inlined and optimized using current C++ compilers, then the whole code base is in trouble because it is filled with getRunningBit(), getNumberOfLiteralWords() and so forth all over, including within hot loops. So there is a strong assumption that C++ compilers are at least that good.
The issue you raise is totally valid and this assumption should be checked.
In Java, I do not make this assumption. Often the JDK cannot optimize these calls away. But C++ is a different beast and I assume that C++ is a lot better at providing us abstraction for free.
E.g. in ewah.h line 908 it's worth making sure compilers compute the upper bound once, and not at each iteration.
A safer alternative, immune to optimization woes, with minimal changes:
The text was updated successfully, but these errors were encountered: