~/talk

Fast Immutable Interval Sets

Talkat Scala World 2017 · 2017-09-16..09-19· [scala]
slides:none on file

Two immutable interval-set implementations: a binary prefix tree for values packable to 64-bit longs and a sorted-array merger for any ordered type, both exposed in Spire/extras. They implement Boolean algebra (union, intersection, complement, XOR, contains, intersects, subset) with structural sharing for cheap backtracking. Performance: negation flips a bit in ~8 ns, union of 100k support points (50k intervals) completes in ~3 ms (tree) and ~5 ms (array), intersection ~2 ms (array). The tree is far more compact and faster when chunks let it reuse subtrees.

AI-written summary · about

  1. 0:00Intro
  2. 1:53So what's this talk about?
  3. 2:37Spire Intervals
  4. 4:32Finding a date for a meeting
  5. 10:08Why functional data structures
  6. 13:28What's different to a collection?
  7. 14:13What operations would be useful?
  8. 17:06Bool typeclass
  9. 18:50Flat sorted array
  10. 24:02Leaf node
  11. 24:51Branch node
  12. 29:36Equality and hash code
  13. 31:01Binary operations (and, or, xor)
  14. 32:28Recursion step, same level
  15. 37:11Benchmark - summary
  16. 39:12Minimum comparison merge
  17. 40:49Get the maximum value out of each comparison
  18. 41:18Algorithm sketch
  19. 41:35And operation in IntervalSeq
  20. 42:40Benchmark - interleaved
  21. 43:51Benchmark - cutoff
  22. 44:29Array vs. Tree - who wins?
  23. 44:48Array vs. Tree - Interleaved
  24. 45:45Array vs. Tree - cutoff
  25. 47:23Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.