Its more likely that humans are redundant. That is, it is probable in a field of millions that two people come up with the same idea and implementation. I think the birthday paradox is a similar corollary on a smaller scale.
These kinds of macro hacks are pretty widespread, aren't they? To me, klib and its khash hash table is the most well-known implementation, see: https://github.com/attractivechaos/klib
And I've written similar things myself (hash table and vectors).
Re:C Template Library
by pwdisswordfish5 on Wednesday December 30, 2020 @05:36AM
(#25580522)
gcc and g++ use the same backend.
Where have you heard that theory? I've wondered about it myself, but other than some songwriter-specific conversation, I'm not sure I'm familiar with other people talking about it, and I'd like to be.
I'm not sure where I heard it, but if you are interested in an article:
https://www.sciencedaily.com/releases/2014/01/140116085105.h...
Re:C Template Library
by joshuaissac on Wednesday December 30, 2020 @09:21AM
(#25581892)
It sounds somewhat similar to Sheldrake's morphic resonance ideas.
As for your pqueue implementation, the efficacy of an optimizing compiler lies in the inherent complexity of the language. I can imagine the optimization backend for gcc is simpler (and more effective) than g++, but I am not an expert on compiler internals.