Opened 2 years ago

Closed 2 years ago

#33553 closed Cleanup/optimization (fixed)

Use built-in math functions in SQLite 3.35+.

Reported by: Nick Pope Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: sqlite, math, functions
Cc: me@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

SQLite 3.35+ has support for some built-in math functions. Where they're available, we should use them in preference to our own versions as it will reduce the number of functions that need to be created for each connection. We can check for ENABLE_MATH_FUNCTIONS in pragma_compile_options().

Change History (4)

comment:1 by Nick Pope, 2 years ago

Has patch: set

comment:2 by Mariusz Felisiak, 2 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 2 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In d4365548:

Fixed #33553 -- Used built-in math functions in SQLite 3.35+.

In SQLite 3.35+ some math functions are available built-in as long as
they are not disabled at compile time. We can introspect this and use
these built-in functions in preference to our slower implementations.

Note: See TracTickets for help on using tickets.
Back to Top