@ramikrispin I think this is it. The Mega Test Scrip creates 1000 different combinations of the rchisq() data and runs it all using different approachs
Finally got my #playdate! After some serious #optimization, my #fallingsand demo now updates 8 times per frame at 50 FPS. That's >400 times per second!
The trick: Instead of iterating over each pixel (bit) individually, I'm doing a bunch of bitwise operations per byte. #indiedev#gamedev
One of my favorite hard #scifi topics that I love to work within (even if I am terrifically starved for time to do much about this at the moment) are wormhole networks.
They have interesting geometry constraints once you add real star maps, #optimization challenges when it becomes time to figure out how many connections you need to connect what places while observing construction and shape constraints…
it is the kind of #graph computer science that tickles my brain extra being scifi nerdy
Web design is a process, running our own websites is awesome, and together it means there’s always something to tweak and improve and optimize. Select things I’ve done over the last few months.
Spent the past few evenings on a very different kind of performance optimization: making my website really, really fast -- with a focus on people with slower, higher-latency connections.
I had to learn some things to pull this off, and I thought they might help others, so I've written the process up in a new blog post:
I just updated my function ckurtosis (cumulative kurtosis) from an #sapply code to a #vecorized approach, not because I don't like *apply functions but because it greatly speeds things up.
This morning, a VPS hosting a small e-commerce site (powered by WooCommerce on Ubuntu 22.04) experienced another out-of-memory issue. A colleague (one of the developers) urgently called me, asking to upgrade the VPS due to excessive load.
I pointed out (again, as has often happened in recent weeks) that a VPS with 32GB of RAM (!!!) and 16 dedicated cores (!!!) should not run out of memory with just five simultaneous visits to a small e-commerce site. We host much larger and busier websites on much smaller VPSs. There's likely a WordPress module with a leak, or some interaction between modules causing this issue.
The response: Okay, but just add more RAM and power to solve it.
The illusion of "infinite resources" in the Cloud has led to poor development habits. Sometimes I wonder how much energy and resources we waste (and pollution we generate) due to a lack of basic optimization.
I'm writing a new big book on software performance and scalability
If you'd like to see early chapter drafts from it, and potentially give me a little feedback (or answer a few simple questions I ask of you, about your impressions), in private? please let me know
🚀 Meet Audun Fauchald Strand and Truls Jørgensen, the dynamic duo of Principal Engineers at NAV (Norwegian Labour and Welfare Administration). With a joint passion for fostering sustainable organizations, they're on a mission to strike the perfect balance between effective team leadership and crafting simple, efficient code. 🌟👨💻
"[T]he ant colony optimization #algorithm (ACO) is a #probabilistic technique for solving computational problems which can be reduced to finding good paths through #graphs. Artificial ants stand for multi-agent methods inspired by the behavior of real ants. The pheromone-based communication of biological ants is often the predominant paradigm used."
The volume of a ball of radius r in n dimensions is
B(n,r) = π^{n/2}/Γ(n/2+1) r^n
If you look at the volumes of the balls (blue circles) inscribed inside hypercubes with edge length 1 and volume 1, they go to zero as n gets larger:
lim n→∞ B(n,½) = 0
If you look at the volumes of the balls (red circles) that circumscribe each hypercube (of diagonal √n), they go to infinity:
lim n→∞ B(n,½√n) = ∞
But what if you always choose the radius of an n-ball so that its volume is exactly 1 (green circles)?
r₁(n) = Γ(n/2+1)^{1/n} / √π
This gives us B(n,r₁(n)) = 1
It turns out that:
lim n→∞ (r₁(n) - √[n/(2eπ)]) = 0
In other words, r₁(n) is asymptotic to a multiple of √n, so it approaches a fixed ratio with the length of the diagonal of the hypercube with the same volume.
"Dimensionally cursed phenomena occur in domains such as numerical analysis, sampling, combinatorics, machine learning, data mining and databases. The common theme of these problems is that when the dimensionality increases, the volume of the space increases so fast that the available data become sparse. In order to obtain a reliable result, the amount of data needed often grows exponentially with the dimensionality. Also, organizing and searching data often relies on detecting areas where objects form groups with similar properties; in high dimensional data, however, all objects appear to be sparse and dissimilar in many ways, which prevents common data organization strategies from being efficient. "