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

Re: [ANNOUNCE] Git v2.19.0-rc0

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
Sep 2, 2018, 18:53 UTC
Message-ID
<39ec35843c3164a9da75466b768636cb7871690d.camel@gmail.com>
In-Reply-To
<f854aba0-6d28-7f2b-aad2-858983c4af36@gmail.com>
On Thu, 2018-08-23 at 06:26 -0400, Derrick Stolee wrote:
Show 12 quoted lines
> 
> Around the time that my proposed approaches were getting vetoed for 
> alignment issues, I figured I was out of my depth here. I reached out to 
> Daniel Lemire (of EWAH bitmap fame) on Twitter [1]. His blog is full of 
> posts of word-based approaches to different problems, so I thought he 
> might know something off the top of his head that would be applicable. 
> His conclusion (after looking only a short time) was to take a 'hasheq' 
> approach [2] like Peff suggested [3]. Since that requires auditing all 
> callers of hashcmp to see if hasheq is appropriate, it is not a good 
> solution for 2.19 but (in my opinion) should be evaluated as part of the 
> 2.20 cycle.
> 

That was an interesting blog post, indeed. It had an interesting comments section. One comment especially caught my eyes was [a]:

"So the way gcc (and maybe clang) handles this is specifically by recognizing memcmp and checking whether a only a 2-way result is needed and then essentially replacing it with a memcmp_eq call.

..."

I find this to be an interesting note. It seems GCC does optimize when we clearly indicate that we use the result of the memcmp as a boolean. So would that help in anyway? Maybe it would help in writing a `hasheq` method easily? I'm not sure.

Show 10 quoted lines
> [1] https://twitter.com/stolee/status/1032312965754748930
> 
> [2] 
> https://lemire.me/blog/2018/08/22/avoid-lexicographical-comparisons-when-testing-for-string-equality/
> 
> [3] 
> https://public-inbox.org/git/20180822030344.GA14684@sigill.intra.peff.net/
> 
> [4] 
> https://public-inbox.org/git/7ea416cf-b043-1274-e161-85a8780b8e1c@gmail.com/

[a]: https://lemire.me/blog/2018/08/22/avoid-lexicographical-comparisons-when-testing-for-string-equality/#comment-344073

-- Sivaraam

Previous: Jeff King
Message 58 of 58 in “[ANNOUNCE] Git v2.19.0-rc0”
  1. Junio C HamanoAug 20, 2018
  2. Stefan BellerAug 20, 2018
  3. Jonathan NiederAug 20, 2018
  4. Jonathan NiederAug 21, 2018
  5. Stefan BellerAug 21, 2018
  6. Derrick StoleeAug 21, 2018
  7. Jeff KingAug 21, 2018
  8. brian m. carlsonAug 22, 2018
  9. Jeff KingAug 22, 2018
  10. Jeff KingAug 22, 2018
  11. Derrick StoleeAug 22, 2018
  12. brian m. carlsonAug 22, 2018
  13. Jeff KingAug 22, 2018
  14. Ævar Arnfjörð BjarmasonAug 22, 2018
  15. Derrick StoleeAug 22, 2018
  16. Jeff KingAug 22, 2018
  17. Duy NguyenAug 22, 2018
  18. Duy NguyenAug 22, 2018
  19. Jeff KingAug 22, 2018
  20. Derrick StoleeAug 22, 2018
  21. Duy NguyenAug 22, 2018
  22. Derrick StoleeAug 22, 2018
  23. Jeff KingAug 22, 2018
  24. Junio C HamanoAug 22, 2018
  25. Jeff KingAug 22, 2018
  26. Derrick StoleeAug 22, 2018
  27. Jeff KingAug 22, 2018
  28. Paul SmithAug 22, 2018
  29. Jeff KingAug 22, 2018
  30. Jonathan NiederAug 23, 2018
  31. Jeff KingAug 23, 2018
  32. Jonathan NiederAug 23, 2018
  33. Jeff KingAug 23, 2018
  34. brian m. carlsonAug 23, 2018
  35. Jonathan NiederAug 23, 2018
  36. Junio C HamanoAug 23, 2018
  37. wide t/perf output, was Re: [ANNOUNCE] Git v2.19.0-rc0Jeff King, Aug 23, 2018
  38. brian m. carlsonAug 23, 2018
  39. Jeff KingAug 23, 2018
  40. Derrick StoleeAug 23, 2018
  41. Junio C HamanoAug 23, 2018
  42. Jeff KingAug 23, 2018
  43. Jacob KellerAug 23, 2018
  44. Jeff KingAug 23, 2018
  45. Jeff KingAug 24, 2018
  46. Jeff KingAug 24, 2018
  47. Jacob KellerAug 24, 2018
  48. Jeff KingAug 24, 2018
  49. Jeff KingAug 24, 2018
  50. Derrick StoleeAug 24, 2018
  51. Junio C HamanoAug 27, 2018
  52. Jeff KingAug 23, 2018
  53. Derrick StoleeAug 23, 2018
  54. Jeff KingAug 24, 2018
  55. Ævar Arnfjörð BjarmasonAug 24, 2018
  56. Derrick StoleeAug 24, 2018
  57. Jeff KingAug 25, 2018
  58. Kaartic SivaraamSep 2, 2018

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.