Skip to content

Decision needed: opt-in fastmath for TypedPython #153

Closed

Description

@b-re-w

Float reductions do not vectorise because TypedPython builds with -ffp-contract=off -fno-fast-math for bit-identical results; numba fastmath=True and Cython -ffast-math are opt-in there.

Options:

  • (a) no fastmath (identity everywhere);
  • (b) an explicit per-function opt-in (e.g. @compiled(fastmath=True)), documented as not CPython-identical, never on by default;
  • (c) only exact transforms (no reassociation), i.e. no change.

Recommendation: (a) for now. Integer and element-wise loops already vectorise; revisit (b) with measurements once #41 items land. Waiting for the user.

Activity

  1. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Decision (user, via the coordinator): (a) no fastmath. TypedPython keeps -ffp-contract=off -fno-fast-math for bit-identical results everywhere, by default and with no switch today. Float reductions stay sequential; integer and element-wise loops already vectorise. A per-function opt-in (option b) is recorded as a separate proposal, #332, not implemented.

  2. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Closed with decision (a); opt-in proposal tracked in #332.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions