... in C or something that allows you to get to the nitty gritty details.
Or if the DS are immutable, do it in Haskell or similar.