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

Re: [PATCH v6 2/2] refs.c: SSE4.2 optimizations for check_refname_component

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 4, 2014, 21:46 UTC
Message-ID
<xmqqsinktkjv.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1401916476.18134.165.camel@stross>
David Turner <dturner@twopensource.com> writes:
> On Wed, 2014-06-04 at 10:04 +0200, Torsten Bögershausen wrote:
> [snip discussion of compiler flags; I'll look into a cpuid approach]
Hmmmm, I am not sure if the complexity is really worth it.

In any case, [PATCH 1/2] is fairly uncontroversial, so I am inclined to queue it by itself early without waiting for the discussion on 2/2 to settle.

>> The name check_refname_component_1() doesn't tell too much,
>> (check_refname_component_sse42()  or check_refname_component_nonsse42() say more)
>
> I'll go with "_bytewise", since that's how it works.

That naming assumes that there will never be any alternative implementation of the bytewise checker other than the one that uses sse42, no?

Show 5 quoted lines
>> can I suggest to move all SSE code out to a file under compat/,
>> like compat/refs_sse42.c, or something similar ?
>
> Since this is a relatively small section of code, I think that would be
> overkill.  Does anyone else have an opinion?

If we foresee people on other architectures to invent different vectorized implementations on their favourite archs, we may end up separating it out into compat/. I have no opinion on how likely that will happen, though, and because this is a small piece of code right now, it shouldn't be too painful to reorganize when the time comes.

Previous: David TurnerNext: David Turner
Message 13 of 14 in “refs.c: optimize check_refname_component()”
  1. 1/2 refs.c: optimize check_refname_component()David Turner, Jun 4, 2014
  2. 2/2 refs.c: SSE4.2 optimizations for check_refname_componentDavid Turner, Jun 4, 2014
  3. Torsten BögershausenJun 4, 2014
  4. Duy NguyenJun 4, 2014
  5. Torsten BögershausenJun 4, 2014
  6. David TurnerJun 4, 2014
  7. Torsten BögershausenJun 5, 2014
  8. Ondřej BílkaJun 5, 2014
  9. David TurnerJun 5, 2014
  10. Torsten BögershausenJun 5, 2014
  11. David TurnerJun 5, 2014
  12. David TurnerJun 4, 2014
  13. Junio C HamanoJun 4, 2014
  14. David TurnerJun 5, 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.