by dagw · 3y ago · 0 comments
Julia, to use the great-great-grand-op's example, seems to also have a reasonably easy C interop (I've never written any Julia, so I'm basing this off skimming the docs, dunno, it might actually be much more of a pain than it looks like here).
https://docs.julialang.org/en/v1/manual/calling-c-and-fortra...
Plus that you now need to write performant (and safe) C code, which (to me) defeats part of the reason to use Python in the first place.
Because if you compare the benefit to the cost of rewrite from py to C and cost of maintaining/updating C code and possible C footguns like manual memory safety, etc - then there is no benefit left
And the parent was talking about numpy code which is better than stock python, who knows how far back normal python would send you.
They're comparing numpy (SIMD plus parallelism) with straightforward C code and getting a 2-5x improvement.
#-of-users * total-time-saved-per-user > time-spent-optimizing
Then it's worth it. You can even multiply by cost of user per time unit and cost of developer per time unit, to see how much money was saved.
Even in cases where its the same person on both sides, it can still work out. There's an xkcd comic about it, even.