7 ms·
I integrated a really simple JS runtime into a C# project once and found the same thing. V8 was orders of magnitude slower due to the interop overhead. Even tho
by xenadu02 7y ago
I integrated a really simple JS runtime into a C# project once and found the same thing. V8 was orders of magnitude slower due to the interop overhead. Even though the IronJS compiler was very simplistic it was just so much faster to do it inside the CLR and let the MSIL JIT optimize to the degree it was able. An example of “worse is better” I suppose.
- nine_k 7y agoI'd say it's an example of optimizing the right thing. Business code is relatively short and uncomplicated, compared to the interop code. So optimizing the slowest part (but not the most obvious part) gave good results. JS inside C# being faster than Node is great news!
- pjmlp 7y agoJust like Google did with their FloatMath class, after Dalvik got replaced by a proper JIT compiler. https://developer.android.com/reference/android/util/FloatMath https://developer.android.com/reference/android/util/FloatMa...