Overclocking STM32 is far easier than overclocking AVR. In AVR, in order to overclock, high speed crystal of that required speed is needed. Also you need to compile the code prior with the overclocked MCU speed to generate hex file. This sounds a lot of work and ofcourse, you can’t change the AVR speed dynamically at run time. In STM32, overclocking can be done with a simple change in code: Change the PLL settings.
Blue pill board has an external 8Mhz crystal, and it is used as the external clock (HSE). All you have to do is to change the PLL multiplier to 16 (maximum value) which results into overclocking STM32F103 to 8MHZ X 16 = 128 MHz. 128MHz is a blistering MCU speed for a cost of < 2$. :)
Show me the Code
Without any further delay, below is the code for setting stm32 clock to 128Mhz. This code is based on popular open source library libopencm3.
The drawback with overclocking the STM32 is that USB will only work when the clock runs at 72Mhz or 48Mhz, as the F103 has only two USB clock divider settings.