math/libdivide 5.4.0 MidnightBSD
Fast integer division using runtime divisors
- System
- MidnightBSD
- Repository
- mports
- Maintainer
- [email protected]
- Port added
- Last update
- Commit
4de1dc64ef- License
- zlib, BSL
- Categories
- math
Description
libdivide allows you to replace expensive integer divides with comparatively cheap multiplication and bitshifts. Compilers usually do this, but only when the divisor is known at compile time. libdivide allows you to take advantage of it at runtime. The result is that integer division can become faster - a lot faster.
Furthermore, libdivide allows you to divide SIMD vectors by runtime constants, which is especially nice because SIMD typically lacks integer division.
See also: https://github.com/ridiculousfish/libdivide/
In the other systems
The newest version among them is 5.4.0, as upstream numbers it.
| System | Port | Version | Vulnerabilities | Status | Maintainer | Last update |
|---|---|---|---|---|---|---|
| MidnightBSD | math/libdivide | 5.4.0 newest | no data | - | [email protected] | 2026-11-05 |
| FreeBSD | math/libdivide | 5.4.0 newest | none known | - | [email protected] | 2026-09-08 |
| DragonFly | math/libdivide | 5.4.0 newest | none known | - | [email protected] | - |
| HardenedBSD | math/libdivide | 5.4.0 newest | no data | - | [email protected] | - |
| GhostBSD | math/libdivide | 5.4.0 newest | no data | - | [email protected] | - |
Version history 1
Upstream's version as each commit to the port's Makefile set it, or as this site first saw it in the system's packages; the tree's own revisions are not versions here.
Install
Binary package:
mport install libdivide
From mports:
cd /usr/mports/math/libdivide && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= libdivide>0:math/libdivide
Dependency graph
Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.
Dependencies
Required by 1
Configuration
Options name: math_libdivide
| Option | Default | Description |
|---|---|---|
| NATIVE | off |
- USES
- cmake:testing compiler:c++11-lang
- Service scripts
- none
Files
pkg-plist 4
- include/libdivide.h
- lib/cmake/libdivide/libdivideConfig.cmake
- lib/cmake/libdivide/libdivideConfigVersion.cmake
- @dir lib/cmake/libdivide
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| ridiculousfish-libdivide-v5.4.0_GH0.tar.gz | 1.291406e+06 | 077e8ce6c783d1b4402aa6d77f643f88f37feb80e9896c30e19a62cc0a3f5576 |