What is the data structure behind Clojure's sets?

后端 未结 4 1672
难免孤独
难免孤独 2020-12-12 20:08

I recently listened to Rich Hickey\'s interview on Software Engineering Radio. During the interview Rich mentioned that Clojure\'s collections are implemented as trees. I\'m

4条回答
  •  臣服心动
    2020-12-12 20:15

    You probably need to read the work of Phil Bagwell. His research into data structures is the base of Clojure, Haskell and Scala persistent data structures.

    There is this talk by Phil at Clojure/Conj: http://www.youtube.com/watch?v=K2NYwP90bNs

    There are also some papers:

    • Fast Functional Lists, Hash-Lists, Deques and Variable Length Arrays
    • Ideal Hash Trees
    • More from Phil here

    You can also read Purely Functional Data Structures by Chris Okasaki. This blog post talks about the book: http://okasaki.blogspot.com.br/2008/02/ten-years-of-purely-functional-data.html

提交回复
热议问题