Python rich plugin performance vs JSVM

If I have a simple requirement to invoke/call out to a remote REST service to simply get determine if a 200 or 401 is the result, which is going to be the fastest option?

a) Middleware JS file using the JSVM and TykMakeHttpRequest

b) Python rich plugin

I.e. is there a ton of overhead for each invocation of

new TykJS.TykMiddleware.NewMiddleware({}) and TykMakeHttpRequest

compared with calling out to a rich plugin each request?

Or is there anything optimized in the JSVM that caches the middleware objects created (implying they must be stateless) so its simply just reinvoking the middleware functions every time

In the JSVM the middleware is created only once and stays in memory, it is then just invoked.

Python will be similar, because it’s a running process. There is an overall performance difference with Python being faster simply because the translation of objects is more efficient.

The difference is that you can tweak Python and get a full Python env to run in, sk threading etc is supported. But in the JSVM you have an ECMAScript interpreter.

makes sense, appreciate the info, thanks