gpio_set/clear overhead

Hello RIOT Community!

For an IR based communication protocol we currently use direct port register access for accurate timings. I now want to port this code to more generic gpio_set / gpio_clear functions, but they are much slower. The resolution of the gpio_t takes more than 20 assembler instructions on``` our board/cpu (msp430) and the timing does not work anymore. Is there a fast and generic way to set and clear gpio pins? If not, what are my alternatives for accurate cross device timings?`

Thanks Gero (new research engineer at CITI Lab, Inria, Lyon)