Due to the high-dimensional data space generated by hyperspectral sensors together with the real-time requirements of several remote sensing applications, it is important to accelerate hyperspectral data analysis. For this purpose, we aim to improve the performance of an existing classification algorithm and reduce its execution time. The proposed algorithm is based on sparse representation and using extended multiattribute profiles as spectral–spatial features, and sparse unmixing by variable splitting and augmented Lagrangian as the optimization method. The speeding up is mainly achieved by exploiting the interdependencies among iterative calls and providing an appropriate memorization technique to reduce the extra cost by factorizing the algebraic computations. The experimental results on two HSI data sets prove that the optimized algorithm is really faster than the original one while retaining the same classification accuracy. This study shows how useful it is to adapt the implementation of the generic module in order to become more appropriate to the application and to minimize the extra costs as much as possible.