SShortSingh.
Back to feed

Password Hashing Speed Varies Significantly Across CPU Architectures and Languages

0
·1 views

A developer tested PBKDF2 password hashing performance across different hardware and programming languages, finding notable differences between Apple M4 Pro and AMD Ryzen 9 9950X processors. On the same task with 500,000 iterations, the Apple M4 Pro consistently outperformed the AMD Ryzen chip across Rust, Odin, and Zig implementations. Even within a single language like Rust, the choice of cryptographic library — aws-lc-rs versus ring — produced measurable performance differences. The findings highlight that code developed on modern Apple Silicon hardware may behave differently when deployed to x86-64 cloud servers. Developers are advised to benchmark security-sensitive operations directly on production hardware to avoid unexpected performance bottlenecks.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Single-flight caching pattern prevents cache stampede and database overload

A Russian apartment listings platform, podbor-minuta.ru, experienced mass request timeouts when a cached database query expired under heavy traffic, causing up to 200 simultaneous identical queries to overwhelm the connection pool. The phenomenon, known as a cache stampede, occurs when a cache key expires at the same moment many requests arrive, each independently triggering the same expensive computation. The team resolved this by implementing a single-flight caching pattern, where the first request to find a missing cache key creates a shared in-flight promise that all concurrent callers await together. This ensures only one database query is executed per key at any given time, regardless of how many requests arrive simultaneously. After the fix, the same traffic load that previously drained the connection pool now produces just one database query per hot key instead of hundreds.

0
ProgrammingDEV Community ·

Single-flight caching pattern stops cache stampedes from crashing databases

Engineers at podbor-minuta.ru, a Moscow new-build property monitoring service, encountered repeated HTTP 500 timeout errors under load caused by a cache stampede — a condition where hundreds of simultaneous requests hit an expired cache key and flood the database at once. The root cause was a naive cache-refresh logic that sent every concurrent request to the database independently when a cached value expired, exhausting the connection pool. To fix this, the team implemented a single-flight caching pattern, where only the first request for an expired key triggers a database query while all other concurrent requests wait for the same shared promise. The in-flight promise map is cleaned up in a finally block to ensure the key is released even if the computation fails, preventing deadlocks. After the fix, 200 concurrent requests on a hot key now produce just one database query instead of 200, eliminating connection pool exhaustion entirely.

0
ProgrammingDEV Community ·

Polymarket Cuts Taker Delay to 50ms, Reshaping Bot Trading Strategies

Polymarket reduced its taker delay on crypto markets from 250ms to 50ms on August 17, 2026, continuing a series of rule changes that previously brought the delay down from 500ms. The tighter window leaves market makers almost no time to cancel stale quotes, raising both the opportunity and risk for automated trading bots. Dynamic taker fees introduced in January 2026 remain in effect, with charges reaching up to 1.56% near 50% probability, effectively killing pure latency arbitrage strategies. Experts now recommend building maker bots that post tight two-sided quotes, use WebSocket-only connections, and complete cancel-and-replace cycles in under 40ms. Under the new rules, winning bots are expected to earn returns through maker rebates and tight spreads rather than by taking positions.

0
ProgrammingDEV Community ·

How to Debug Android Chrome Browser Logs from a Windows Laptop Using USB

Developers can debug websites on a physical Android device by enabling Developer Options and USB Debugging in the phone's settings. The device must be connected to a Windows laptop via a data-capable USB cable, with file transfer mode selected and USB debugging authorized on the phone. On the Windows laptop, navigating to chrome://inspect/#devices in Chrome with 'Discover USB devices' enabled allows remote access to the Android browser's DevTools. This setup lets developers inspect console logs, JavaScript errors, network requests, and API responses as they occur on the actual device. If the device appears as 'unauthorized' or 'pending authentication', revoking and re-enabling USB debugging authorizations or using Android Platform Tools' ADB command can resolve the issue.