Using raw mode to write the inverse (instead of string mode) yields:
02.416 seconds (n=1000)
The GAMS version should get similar performance (may be even faster as I did not use any compiler flags to do better optimization).
So I am now a full time math programming consultant... I will try to post my (technical) notes here. Keeping a searchable list of them will make this useful for me in my daily life.