An practical perfomance improved Thorup algorithm