Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
cljfx
Declarative, functional and extensible wrapper of JavaFX inspired by better parts of react and re-frame
-
cljs-tui-template
A leiningen template to generate ClojureScript Terminal-User-Interface applications built on web technologies you already know.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
declares an array of struct of arrays, where each inner struct array contains 8 elements. This would have the advantage of playing well with the streaming prefetcher if you're working with all fields of the `Point` type.
Julia's StructArrays package is also very convenient: https://github.com/JuliaArrays/StructArrays.jl
Look for "Data oriented design" or "Structs of arrays".
Here's a talk on the former by Mike Acton: https://www.youtube.com/watch?v=rX0ItVEVjHc
On the latter, there's Jai, a new programming language for games (WIP, unpublished) by Jonathan Blow, who has been very public in documenting the process creating it, and which is centered around such concepts. There is some unofficial documentation of the ideas on SoA vs AoS and how the language can help switching between the two, e.g. here: https://pixeldroid.com/jailang/overview/Features/SOA/#/overv... and here: https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md...
I hacked up something similar (https://gitlab.com/mbryant/functiontrace/-/blob/master/src/p...) a while ago. Your variant looks much more useful!
Here is a Nim library inspired by the blog post that simulates array-of-structs with struct-of-arrays:
https://github.com/liquidev/datarray
The same technique can be used with Clojure + JavaFX [0] and even at the terminal [1]!
[0] https://github.com/cljfx/cljfx
[1] https://github.com/eccentric-j/cljs-tui-template
The same technique can be used with Clojure + JavaFX [0] and even at the terminal [1]!
[0] https://github.com/cljfx/cljfx
[1] https://github.com/eccentric-j/cljs-tui-template