git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] On watchman support

From
David Turner <dturner@twopensource.com>
Date
Dec 1, 2014, 20:45 UTC
Message-ID
<1417466750.20544.2.camel@leckie>
In-Reply-To
<CACsJy8DayFy83JijrkgST5rAbNsst-dgqaP-ebpWXoGKPtp7sA@mail.gmail.com>
On Fri, 2014-11-28 at 18:13 +0700, Duy Nguyen wrote:
Show 25 quoted lines
> On Wed, Nov 19, 2014 at 1:12 AM, David Turner <dturner@twopensource.com> wrote:
> >> Or will you go
> >> with cityhash now.. I ask because you have another sse optimization
> >> for hashmap on your watchman branch and that could reduce init time
> >> for name-hash. Name-hash is used often on case-insensitive fs (less
> >> often on case-sensitive fs).
> >
> > Cityhash would be better, because it has actual engineering effort put
> > into it; what I did on my branch is a hack that happens to work
> > decently.  As the comment notes, I did not spend much effort on tuning
> > my implementation.  Also, Cityhash doesn't require SSE, so it's more
> > portable.
> 
> Cityhash looks less appealing to me. For one thing it's C++ so linking
> to C can't be done. I could add a few "extern "C"" to make it work.
> But if we plan to support it eventually, cityhash must support C out
> of the box.
> 
> Then cityhash does not support case-insensitive hashing. I had to make
> a CityHash32i version based on CityHash32. It's probably my bugs
> there, but performance is worse (~120ms) than original hashmap.c
> (90ms). Enabling sse4.2 helps a bit, but still worse. Using the
> case-sensitive version in place for memihash and strihash does make
> cityhash win over hashmap.c, around 50ms (with or without sse4.2). But
> that's still not as good as your version (~35ms)..
Can you post your CityHash32i?  
Have you tried this C port of Cityhash?
https://github.com/santeri-io/cityhash-c
Previous: Duy NguyenNext: Paolo Ciarrocchi
Message 13 of 15 in “[RFC] On watchman support”
  1. Duy NguyenNov 11, 2014
  2. Torsten BögershausenNov 13, 2014
  3. Duy NguyenNov 13, 2014
  4. Torsten BögershausenNov 15, 2014
  5. David TurnerNov 18, 2014
  6. Duy NguyenNov 18, 2014
  7. David TurnerNov 18, 2014
  8. Junio C HamanoNov 18, 2014
  9. David TurnerNov 18, 2014
  10. Junio C HamanoNov 18, 2014
  11. Jeff KingNov 19, 2014
  12. Duy NguyenNov 28, 2014
  13. David TurnerDec 1, 2014
  14. Paolo CiarrocchiNov 19, 2014
  15. David TurnerNov 19, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.