It should not be hard to find collision.
There is only 4 294 967 296
possible signatures.
2 Answers
The function signatures need to be unique only within a contract. The Solidity compiler will detect and prevent collisions if they are not unique in this case. If you have fewer than 2^16 functions in your contract, collisions are unlikely to happen by chance.
There was a Reddit thread about this recently, but it seems a bit contrived to me and not a problem in practice.
-
Having two identical function hash in the same contract means two functions with the same signature and that is impossible and compiler would detect it. Aug 5, 2017 at 20:35
If two functions have exact same signature in within your contract, the program will not run as during function call, the flow would be confused in which function it has to go. Function overloading is possible but the signature of each function should be unique within the contract. Different contracts can have same function signature. Refer this for function signatures.
contract a {int public gsf;int public tgeo;}
it won't compile