Login
You're viewing the appalorchard.com public feed.
  • davedthompson@toot.cat
    Oct 29, 2026, 1:26 AM

    okay I seem to have a successful fusion of diets and red-black trees. let's call them "balanced diets".

    💬 1🔄 0⭐ 6

Replies

  • davedthompson@toot.cat
    Oct 29, 2026, 1:29 PM

    I started comparing balanced diets to guile's intsets as the results are as expected. if the set stored in a diet is actually dense (a lot of adjacent ints) and thus the tree is shallower than the intset's prefix tree then it's faster to query the diet. otherwise the intset's 32-way branching wins.

    it's also much faster to add contiguous ranges of numbers to a diet because it was built for this and you don't have to insert one number at a time.

    💬 0🔄 0⭐ 2