Better HN
topnewbestaskshowjobs
Log inSign up

deegu

2 karma · joined Jul 4, 2015 (11y ago) · 4 submissions

Submissions

comment 7mo ago · link · parent

Perhaps. Then again, if your target is to reduce dram refresh induced latency, you might not have time to prefetch either.

comment 7mo ago · link · parent

This might be useful in a case where a small lookup or similar is often pushed out from cache such that lookups are usually cold. Yet lookup data might by small enough to not cause issue with cache pollution, increased bandwidth or memory consumption.

comment 9y ago · link · parent

CPU frequency scaling can also lead to somewhat unintuitive results. On few occasions I've seen CPU load % increasing significantly after code was optimized. Optimization was still actually valid, and the actual executed instructions per work item went down, but the CPU load % went up since OS decided to clock down the CPU due to reduced workload.

comment 11y ago · link · parent

if you run it with luajit -jv primes.lua you'll see NYIs about math.mod not implemented.

Replacing math.mod(n, i) with (n % i) gives roughly 9.4x performance.

EDIT: luajit version was LuaJIT 2.0.4 on Mac OSX