Performance of NativeScripts

Interestingly I observe that performance degradation is noticeable only with scripted sorting, but not with function_score. Any ideas on what may be the cause? Posted here: