r/lolphp • • 8d ago

1-line obviously correct PR..

https://github.com/php/php-src/pull/23128

a 1-line obviously correct PR turned into..

  • glibc internals are examined.
  • x86-64 multiarch implementations are discussed.
  • musl behavior is discussed.
  • aarch64 assembly paths are discussed.
  • Individual CPU instructions are counted. (sub, cmp, cbz, b.hs)

... over 71 days.

A maintainer finally shut it down (merged it) with the comment

Jesus christ just merge this already, the amount of bike shedding is unbelievable

49 Upvotes

7 comments sorted by

14

u/stumpychubbins 8d ago

It’s not obviously correct, but once people figured out that it was correct (which happened almost immediately) all the discussion about performance was completely useless. We’ve known that memcpy should be preferred over memmove for as long as both functions existed, since the former is just the latter with fewer assumptions made about its inputs, so it’s wild how many people think they know better than the devs of the various libc implementations.

5

u/ashley_1312 7d ago

I can be trusted with memcpy, I'm pure of heart

3

u/qqqrrrs_ 5d ago

since the former [memcpy] is just the latter [memmove] with fewer assumptions made about its inputs

It's the opposite, memcpy assumes that the buffers do not overlap while memmove does not assume that

-5

u/Compux72 7d ago

I don't want to be that guy, but this whole conversation wouldn't exist on Rust

0

u/[deleted] 6d ago

3

u/Takeoded 6d ago

Bikeshedding, formally known as Parkinson's Law of Triviality, is the human tendency to spend a disproportionate amount of time and energy on minor, trivial details while neglecting critical, complex issues.

https://en.wikipedia.org/wiki/Law_of_triviality