This study proposes a rapid algorithm for calculating the maximum torque provided by a reaction-wheel array in a general configuration. In attitude control, the reaction wheel array must determine the specific torque value of each reaction wheel from the body torque command as a reference. This challenge involves solving an underdetermined system in satellites equipped four or more reaction wheels. This research has developed a fast algorithm to calculate the maximum torque and momentum by using a hash algorithm paired with a pre-developed hash table. Furthermore, this research explores non-Haar conditioned wheel configurations. Unlike traditional minimum L2-norm solutions, our approach adopts a geometric perspective, emphasizing the effective management of angular momentum in generating torque commands. Simulation results demonstrate the accuracy and effectiveness of the proposed method in calculating the maximum torque. Additionally, we have analyzed the time complexity and required memory size of look-up tables, ensuring compatibility with onboard implementations.