Just take the time to learn machine language. I've been working on that bit by bit over the last 40 years. I'm up to the "o" in Hello World. No, the first "o" but thanks for your optimism. Hey, I had a lot going on in 1983...
Assembly is doable, but man it's a headache. QB64 already makes C/C++ routines. My bet is they are poorly optimized, so they will probably not run as fast as an optimized C/C++ program. I've heard FreeBASIC people claim FB is faster, but I'd rather shoot myself in the foot and hop off a cliff than switch to FB... or listen to FB people :P Anyway, IF FB or any other language translated directly to a well optimized sequence in machine code, that would be as fast as you could get, at least to my understanding.
Ashish has good advice about adding the meta command $CHECKING:OFF to the top of your code. Just make sure it is completely debugged. Why? Because that meta command disables the error checking function in QB64, which means less time wasted on checking for errors, which will not occur.
People who use Python and want to speed it up, it's a higher level language and prone to be a bit sluggish as such, use C-extensions in to optimize hot spots for improved performance. Think of it as their little blue pill...
Also, if you can, define all your variables as integers. Integers get processed faster, because they are allocated less memory. DEFINT h-j at the top of your code would make any variables that start with h, i, or j be assigned as integers. No need for % sign after the variables in the code, either.
Well, try the $CHECKING:OFF recommendation and I hope it's fast enough for whatever you are doing, and if it isn't about a project, and just a curiosity, that's fine, too.
Pete