An adaptive gravitational search algorithm (GSA) that switches between synchronous and asynchronous update is presented in this work. The proposed adaptive switching synchronous–asynchronous GSA (ASw-GSA) improves GSA through manipulation of its iteration strategy. The iteration strategy is switched from synchronous to asynchronous update and vice versa. The switching is conducted so that the population is adaptively switched between convergence and divergence. Synchronous update allows convergence, while switching to asynchronous update causes disruption to the population’s convergence. The ASw-GSA agents switch their iteration strategy when the best found solution is not improved after a period of time. The period is based on a switching threshold. The threshold determines how soon is the switching, and also the frequency of switching in ASw-GSA. ASw-GSA has been comprehensively evaluated based on CEC2014’s benchmark functions. The effect of the switching threshold has been studied and it is found that, in comparison with multiple and early switches, one-time switching towards the end of the search is better and substantially enhances the performance of ASw-GSA. The proposed ASw-GSA is also compared to original GSA, particle swarm optimization (PSO), genetic algorithm (GA), bat-inspired algorithm (BA) and grey wolf optimizer (GWO). The statistical analysis results show that ASw-GSA performs significantly better than GA and BA and as well as PSO, the original GSA and GWO.12