PAMI code that works fine with spate

No performance improvement is seen.