@1010011010 quick update: I've finished the simple Log speedup test in the uMatrix uTerm evaluation and I've gone from ~180s to ~100s, so that's something at least.
Is there a simple way for a Mathematica script to start a new process and exit immediately (i.e. not wait for the started process to finish before exiting, and not kill that process when exiting)?
@Szabolcs On Linux: math < test.m > test.out & works, so you should be able to do something inside a Mathematica script. Or use NOHUP or something like this. But you are on Mac, right?
@RolfMertig That's not exactly what I meant, but I guess I can use & in Run. I was thinking in terms of RunProcess which wouldn't do this.
I meant starting a WL script, which will do some things, then it will start a different process and exit immediately (without waiting for that process).
I'll try if Run["prog &"] works for this
The same works on Mac too, and I don't need it on Windows
@1010011010 I actually created a separate C++ file and used LoadLibrary. When I tried FunctionCompile, it ended up returning NaN's for all negative numbers!
Man, I must admit I didn't think the problem would be this nasty
Coding in Mathematica wasn't nearly as hard as anything you described, it was just the compilation times that got annoying for more complicated systems
@1010011010 and this is a very quick and dirty spot-optimization. I'm not qualified to analyze the algorithm itself and see if there are larger architectural changes that might help.
sometimes you really have to wrestle with MMA to get the performance you need.
anyways, I'm happy to upload what I've tinkered with if you think 40-45% speedup would be useful.
@GalAster I don't think there's a real way to do this. I have code to just copy out the core pieces of the paclet into a directory and then pack those. That's how I tend to work.
@ChrisK I was super amused by that
He seemed to think it was just because of prototype build but obviously that's not the case