Today I was able to use compiled C library in X11basic. I compiled the c_environment code to libarduino.so for use in x11basic.
Then I wrote this code to init gpio pins, set pinmode of pin 1 to output, and then raise and lower pin 1 with as little code as possible.
'Set pinmode to output
' setup digitalWrite
Running this code from the interpreter produced switching as 17.4khz or 57.2us.
Compiled to a native program produced 41.2khz or 24.3us.
This matches what I was able to do with yaBasic and since it does not have the ability to access C libraries I do not see a way to improve it.
Using the compiled library should also give me access to SPI, I2C, etc. Time will tell.