Bucketing Swift arrays in place

An interesting problemA while back, I had a large array of structs representing jobs, which I needed to hand off to different services depending upon various tests. I wanted to minimise memory usage so I had a few requirements: Don't allocate new arrays (they're slow to allocate and eat memory)…