binary search for new reflection functionsprevious implementation caused stackoverflow because if statements were nested too deep (commit: 00f2214)