This content originally appeared on DEV Community and was authored by BuildCoreWorks
The Problem:
Pure PHP Keccak hashing: 0.28-0.44ms per hash
At scale, this makes Ethereum development impractical
The Solution:
C extension using direct memory operations
Benchmarked results: 0.018-0.032ms per hash
Performance:
- Intel i3-2130 (2011): 0.032ms vs 0.443ms = 14× faster
- AMD Ryzen 7 3700X: 0.018ms vs 0.280ms = 16× faster
- Works in Docker and bare metal
Real-world impact:
- 1M hashes: 18-32 seconds (native) vs 4.6-7.4 minutes (pure PHP)
- 10M hashes: 3-5 minutes (native) vs 46-74 minutes (pure PHP)
Use Cases:
- Ethereum address derivation
- Transaction hashing
- dApp backends
- Any high-throughput crypto work
Installation:
bash
git clone https://github.com/BuildCoreWorks/php-keccak256.git
cd php-keccak256
phpize && ./configure && make && sudo make install
This content originally appeared on DEV Community and was authored by BuildCoreWorks

BuildCoreWorks | Sciencx (2025-10-14T08:27:11+00:00) Building a High-Performance Keccak-256 Extension for PHP: 14-16 Faster. Retrieved from https://www.scien.cx/2025/10/14/building-a-high-performance-keccak-256-extension-for-php-14-16-faster/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.