5 ms·
It'd be nice if they talked about what their compilation did.
by spankalee 4y ago
It'd be nice if they talked about what their compilation did.
- addityasingh 4y agoHello. We have a talk from GraphQL conf 2019 on the workings of JIT which should be helpful to understand this: https://www.youtube.com/watch?v=kdMyfO9IlLA&t=1s https://www.youtube.com/watch?v=kdMyfO9IlLA&t=1s
- justsomeuser 4y agoIt uses `new Function(string_of_js_code)`
- anentropic 4y agoIn the first paragraph: > graphql-jit leverages this behaviour of V8 optimization by compiling the queries into functions to significantly improve performance and https://github.com/zalando-incubator/graphql-jit#compile-a-query https://github.com/zalando-incubator/graphql-jit#compile-a-q... so I guess the difference is instead of having totally generic functions that parse the query every time, instead you can call a factory function up front to get a specialised function for a particular query and V8 JIT can make that faster