This paper addresses the real-time implementation of the Simultaneous Localization and Map Building (SLAM) algorithm, focusing on optimizing computational requirements without compromising accuracy. The authors present optimal algorithms that leverage the special form of matrices and a new compressed filter to significantly reduce computation when working in local areas or with high-frequency external sensors. The extended Kalman filter (EKF) is extended to handle SLAM, and the complexity of the SLAM algorithm is reduced from \(\sim O(M^3)\) to \(\sim O(M^2)\). A compressed filter is introduced to store and maintain information gathered in a local area with a cost proportional to the square of the number of landmarks in that area, which can then be transferred to the global map with a cost similar to full SLAM but in one iteration. The paper also discusses sub-optimal simplifications for updating the covariance matrix of states, making the total computational cost proportional to the number of landmarks. The effectiveness of the proposed algorithms is demonstrated through experimental results obtained with a standard vehicle in an unstructured outdoor environment.This paper addresses the real-time implementation of the Simultaneous Localization and Map Building (SLAM) algorithm, focusing on optimizing computational requirements without compromising accuracy. The authors present optimal algorithms that leverage the special form of matrices and a new compressed filter to significantly reduce computation when working in local areas or with high-frequency external sensors. The extended Kalman filter (EKF) is extended to handle SLAM, and the complexity of the SLAM algorithm is reduced from \(\sim O(M^3)\) to \(\sim O(M^2)\). A compressed filter is introduced to store and maintain information gathered in a local area with a cost proportional to the square of the number of landmarks in that area, which can then be transferred to the global map with a cost similar to full SLAM but in one iteration. The paper also discusses sub-optimal simplifications for updating the covariance matrix of states, making the total computational cost proportional to the number of landmarks. The effectiveness of the proposed algorithms is demonstrated through experimental results obtained with a standard vehicle in an unstructured outdoor environment.