Integers are much faster than floats (floats involve a pointer and a heap allocation, integers are stored in a single word/object).
array.array is preferred over list for something like sort. Continuous memory representation of numbers versus general purpose list of objects.
MicroPython has on-board "JIT" (native/viper emitters), have to explicitly annotate the function. Should give 4-10x improvements for this case.
MicroPython has an on-board assembler, so one can write ARM assembly and get that to a function.
MicroPython also has support for C modules, which expose a Python API. Including dynamic native modules which can be installed at runtime with the package manager.
Bubblesort is O(n*2), which hurts for even a few thousand numbers. Actual sorting on a microcontroller should be done with an O(n log n) algorithm.