
This work is based on the "Atomics Manifesto" that described how we envisioned threading to be a key part of the language's future, links to which can be found in the Julia manual on multi-threading with per-field atomics A summary of the new functionalities was presented at JuliaCon and can be found on youtube. Support for atomic access to mutable struct fields has been added to provide more efficient build-blocks for working with threads via a set of macros, and their corresponding generic functions.
DATATHIEF III VERSION 1.7 GENERATOR
This release is no exception: we've addressed numerous race conditions in the runtime, chased down synchronization mistakes, refined support for scheduling workloads on multiple threads, made the default random number generator more thread-friendly, and added atomics as a primitive language feature! The last few releases have been big ones for multithreading-demanding programs in Julia. It took a bit of debate for all of us to be comfortable spending precious bytes of Task objects this way, but we are huge fans of reproducibility and so the proposal was eventually adopted. That makes random numbers depend only on the task spawning structure of a program, and not on the parallel execution schedule. Chet's proposal took advantage of the much smaller state of the Xoshiro256 family of RNGs to put a state in every task, and fork it on each task creation. We also used thread-local RNG states for thread safety, which has a bit of overhead and made random streams task-schedule-dependent.

Mersenne Twister is famous for having an exceptionally long period, but that requires a correspondingly large state, and is not truly necessary for any practical application. We knew we might want to re-evaluate that choice at some point, but it didn't seem particularly urgent until Chet Hega pointed out that by changing algorithms we could not only get a significant speed-up, but also make random number streams reproducible in multi-threaded programs.

Conclusion New RNG (reproducible RNG in tasks)įrom its very first release, Julia used the popular Mersenne Twister algorithm as its default random number generator.Better path printing for standard libraries in errors.
