TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Understanding Clojure's Persistent Vectors, Part 1

106 pointsby llambdaover 11 years ago

5 comments

StefanKarpinskiover 11 years ago
Does anyone have benchmarks comparing the performance of Clojure's PersistentVectors to standard arrays in Java and/or C? O(1) is pretty useless if the constant factor is huge. Anecdotally, I've heard that they are "fast" but it would be interesting to know what that really means.
评论 #6446771 未加载
评论 #6447497 未加载
评论 #6447570 未加载
评论 #6448252 未加载
postfuturistover 11 years ago
&gt; They are a data structure invented by Rich Hickey for Clojure<p>It is an implementation of a data structure invented by Phil Bagwell: <a href="http://lampwww.epfl.ch/papers/idealhashtrees.pdf" rel="nofollow">http:&#x2F;&#x2F;lampwww.epfl.ch&#x2F;papers&#x2F;idealhashtrees.pdf</a>
评论 #6445929 未加载
评论 #6445920 未加载
fyolnishover 11 years ago
&quot;practically O(1)&quot; is an interesting statement
评论 #6447172 未加载
评论 #6446801 未加载
film42over 11 years ago
Awesome post! The diagrams are really great additions. I look forward to the rest of the series. :)
oskarkvover 11 years ago
Branching factor 32 is great for lookups, but isn&#x27;t it slower for modification? At least, one has to create more array cells in total (31 copies in each node), no?