I tested hex in a 1000w times for loop with random numbers, old hex avg time cost is 4.92 s,optimize hex avg time cost is 0.46 s which faster nearly 10x.