How does RandomX compare to CryptoNight?
RandomX and CryptoNight are two different ways Monero has used to check mining work, but RandomX is the one Monero uses today. The main difference is that RandomX makes miners run changing, computer-like tasks to favor ordinary processors, while CryptoNight relied more on repeated work with a small area of memory.
What changed, and why?
Mining means your computer does work to help secure the network and compete for block rewards. A mining algorithm sets the rules for that work.
Monero launched in April 2014 using CryptoNight, inherited through its CryptoNote roots. It later used modified CryptoNight versions before switching to RandomX on November 30, 2019.
Both algorithms aimed to resist ASICs: specialized chips built to perform one narrow job very efficiently. The goal was to keep mining practical on widely available hardware.
CryptoNight’s memory requirements were meant to make specialized chips less attractive. But CryptoNight ASICs eventually appeared. Monero changed the algorithm several times to disrupt them, then adopted RandomX as a more ambitious approach.
How the work differs
CryptoNight repeatedly mixed data in a small working area of memory, often called a scratchpad. The original version used about 2 MB per mining instance. Fast access to that memory mattered, which made a processor’s nearby, high-speed memory useful.
RandomX goes further. It runs generated programs that combine different kinds of calculations, memory reads, and decisions. These programs run inside a virtual machine, a software environment with its own defined instructions.
That distinction matters:
- CryptoNight: Make one relatively fixed pattern of work depend heavily on memory.
- RandomX: Make the work resemble the varied tasks a general-purpose processor already handles well.
RandomX’s tasks are not useful apps or AI jobs. They exist to provide proof of work: evidence that a miner spent computing effort.
What this means for your hardware
RandomX strongly favors your CPU, the main processor in your computer. GPUs, the chips commonly used for graphics, could compete more effectively under CryptoNight than they generally can under RandomX.
RandomX also needs more memory in its high-performance setup:
- Fast mode: Uses a 2,080 MB dataset, plus supporting memory.
- Light mode: Uses a 256 MB cache instead of the full dataset, but runs much more slowly.
- Per mining thread: Plan for about 2 MB of L3 cache, fast memory shared inside many CPUs. A thread is one stream of mining work.
The large dataset can be shared by mining threads; you do not need another 2,080 MB for every thread. Adding threads beyond what your CPU’s cache and memory can support may provide little benefit.
Neither design makes ASICs mathematically impossible. RandomX aims to reduce their potential advantage, not guarantee they can never exist.
What this means for browser mining
An old CryptoNight browser miner cannot mine current Monero simply by changing its payout address. It needs support for RandomX or must be part of a service that does something different behind the scenes.
RandomX is also harder to run efficiently in a browser. Memory limits, restricted execution features, and background-tab throttling can put browser mining well behind dedicated mining software.
Do not compare CryptoNight and RandomX using hash-rate numbers alone. A hash rate counts mining attempts per second, but an attempt involves different work under each algorithm.
The bottom line
RandomX replaced CryptoNight to make Monero mining better suited to general-purpose CPUs and harder to specialize. For you, that means higher memory demands, a stronger CPU advantage, and a need to verify what any browser-mining service actually runs.
