Skip to content

Check that compiler generates reasonable code when upper bound of for loop involves a function call #19

Description

@dictoon

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:

for (size_t k = 0, e = rlw.getNumberOfLiteralWords(); k < e; ++k)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions