BSD Ports

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.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
MidnightBSDmath/libdivide5.4.0 newestno data-[email protected]2026-11-05
FreeBSDmath/libdivide5.4.0 newestnone known-[email protected]2026-09-08
DragonFlymath/libdivide5.4.0 newestnone known-[email protected]-
HardenedBSDmath/libdivide5.4.0 newestno data-[email protected]-
GhostBSDmath/libdivide5.4.0 newestno data-[email protected]-

Version history 1

  1. 5.4.0 4de1dc64ef

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

OptionDefaultDescription
NATIVEoff
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
FileSizeSHA256
ridiculousfish-libdivide-v5.4.0_GH0.tar.gz1.291406e+06077e8ce6c783d1b4402aa6d77f643f88f37feb80e9896c30e19a62cc0a3f5576

Commit history 1

DateCommitCreditsLog message
4de1dc64ef Lucas Holt math/libdivide: add 5.4.0 integer division headers (#2318)