commit 4bb34de9a798e1954e09ec3b6d8d8b8db645e5d7
parent 669c4ffd1cc7826876af2d67661738c2081ea6a9
Author: Jared Tobin <jared@jtobin.io>
Date: Sun, 28 Dec 2025 11:45:08 -0330
release: v0.1.4
Diffstat:
5 files changed, 27 insertions(+), 24 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,5 +1,8 @@
# Changelog
+- 0.1.4 (2025-12-28)
+ * Adds an 'llvm' build flag and tests with GHC 9.10.3.
+
- 0.1.3 (2025-01-21)
* Improves padding handling for the strict bytestring case, yielding
performance increases for both 'hash' and 'hmac'.
diff --git a/README.md b/README.md
@@ -63,16 +63,16 @@ Current benchmark figures on an M4 Silicon MacBook Air look like (use
```
benchmarking ppad-sha512/SHA512 (32B input)/hash
- time 419.3 ns (419.1 ns .. 419.7 ns)
+ time 237.8 ns (237.4 ns .. 238.2 ns)
1.000 R² (1.000 R² .. 1.000 R²)
- mean 420.4 ns (420.1 ns .. 421.1 ns)
- std dev 1.507 ns (843.5 ps .. 2.705 ns)
+ mean 237.3 ns (237.1 ns .. 237.8 ns)
+ std dev 1.226 ns (854.2 ps .. 1.982 ns)
benchmarking ppad-sha512/HMAC-SHA512 (32B input)/hmac
- time 1.340 μs (1.339 μs .. 1.341 μs)
+ time 1.017 μs (1.013 μs .. 1.021 μs)
1.000 R² (1.000 R² .. 1.000 R²)
- mean 1.343 μs (1.342 μs .. 1.347 μs)
- std dev 8.443 ns (3.955 ns .. 14.85 ns)
+ mean 1.015 μs (1.014 μs .. 1.018 μs)
+ std dev 7.727 ns (6.045 ns .. 9.684 ns)
```
You should compile with the 'llvm' flag for maximum performance.
diff --git a/flake.lock b/flake.lock
@@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1710146030,
- "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1725910328,
- "narHash": "sha256-n9pCtzGZ0httmTwMuEbi5E78UQ4ZbQMr1pzi5N0LAG8=",
+ "lastModified": 1766840161,
+ "narHash": "sha256-Ss/LHpJJsng8vz1Pe33RSGIWUOcqM1fjrehjUkdrWio=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "5775c2583f1801df7b790bf7f7d710a19bac66f4",
+ "rev": "3edc4a30ed3903fdf6f90c837f961fa6b49582d1",
"type": "github"
},
"original": {
@@ -51,11 +51,11 @@
]
},
"locked": {
- "lastModified": 1741625558,
- "narHash": "sha256-ZBDXRD5fsVqA5bGrAlcnhiu67Eo50q0M9614nR3NBwY=",
+ "lastModified": 1766934151,
+ "narHash": "sha256-BUFpuLfrGXE2xi3Wa9TYCEhhRhFp175Ghxnr0JRbG2I=",
"ref": "master",
- "rev": "fb63457f2e894eda28250dfe65d0fcd1d195ac2f",
- "revCount": 24,
+ "rev": "58dfb7922401a60d5de76825fcd5f6ecbcd7afe0",
+ "revCount": 26,
"type": "git",
"url": "git://git.ppad.tech/base16.git"
},
@@ -71,11 +71,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
- "lastModified": 1737297101,
- "narHash": "sha256-EnXnq+JLflbWt+DvaGGnY2gfAqsGNOm5vPgHh3hkfwQ=",
+ "lastModified": 1766932084,
+ "narHash": "sha256-GvVsbTfW+B7IQ9K/QP2xcXJAm1lhBin1jYZWNjOzT+o=",
"ref": "master",
- "rev": "f29823875250bc99b3891f7373535ccde9a29a44",
- "revCount": 1,
+ "rev": "353e61763b959b960a55321a85423501e3e9ed7a",
+ "revCount": 2,
"type": "git",
"url": "git://git.ppad.tech/nixpkgs.git"
},
diff --git a/flake.nix b/flake.nix
@@ -25,11 +25,11 @@
pkgs = import nixpkgs { inherit system; };
hlib = pkgs.haskell.lib;
- llvm = pkgs.llvmPackages_15.llvm;
+ llvm = pkgs.llvmPackages_19.llvm;
base16 = ppad-base16.packages.${system}.default;
- hpkgs = pkgs.haskell.packages.ghc981.extend (new: old: {
+ hpkgs = pkgs.haskell.packages.ghc910.extend (new: old: {
ppad-base16 = base16;
${lib} = old.callCabal2nixWithOptions lib ./. "--enable-profiling" {
ppad-base16 = new.ppad-base16;
diff --git a/ppad-sha512.cabal b/ppad-sha512.cabal
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: ppad-sha512
-version: 0.1.3
+version: 0.1.4
synopsis: The SHA-512 and HMAC-SHA512 algorithms
license: MIT
license-file: LICENSE
@@ -8,7 +8,7 @@ author: Jared Tobin
maintainer: jared@ppad.tech
category: Cryptography
build-type: Simple
-tested-with: GHC == { 9.8.1, 9.6.6, 9.6.4 }
+tested-with: GHC == 9.10.3
extra-doc-files: CHANGELOG
description:
A pure implementation of SHA-512 and HMAC-SHA512 on strict and lazy