3 ms·
implementing addition in woxilang itself?? this gotta be terribly slow. am i missing something?
by nextaccountic 8mo ago
implementing addition in woxilang itself?? this gotta be terribly slow. am i missing something?
- tadfisher 8mo agoYou are missing the term "JIT", which would enable a host of runtime optimizations which include generating calls to some static piece of native code which performs addition.
- nextaccountic 8mo agoBut surely you can have a "fast path" that is implemented in the host language, right?
- theowaway213456 8mo agoI am confused for the same reason you are. Isn't the rust code just "pre-jitted" code essentially? i.e. hand optimized. You are going to want to hand-optimize some functions in cases where the jit cannot do a good job in its current form. You probably also want a benchmarking system where you compare the jitted code to the hand optimized code, to prove to yourself that the hand optimized code is still worth keeping, after any automatic jit improvements you make. And if you don't want the runtime overhead of the jit then you can pre-jit certain functions and distribute them as part of the binary's executable code
- evanb 8mo agoMathematica has symbolic and infinite-precision addition, so you can't automatically take advantage of obvious compiled code.
- sfpotter 8mo agoWhat? Arbitrary precision arithmetic implemented in a compiled language will be faster than the alternative. This is no great mystery. The same is true of essentially all low-level symbolic or numerical math algorithms. You need to get to a fairly high level before this stops being true.
- creato 8mo agoOf course. The point is whether you interpret a call to arbitrary_precision_add or compile the call doesn't matter much.
- deleted 8mo ago[deleted]