use lookuptables,and cross them,it's faster 25~35%, and complete big four functions.