performance: optimize the pragma setup code