Speed up linear test by using the undocumented LinearQ function.#14
Speed up linear test by using the undocumented LinearQ function.#14vsht wants to merge 1 commit intochristophmeyer:masterfrom
Conversation
|
Hi Vlad, thanks for the suggestion. Have you measured the total speedup of this change when running the examples? |
|
This should mostly be relevant for rather large systems, where the number of equations is so In our test suite (I didn't run the longer examples) "Triple box" seems to benefit most from the new fix. On Mma 13.0 (Linux) with Ryzen 4750U when running I get for the current implementation and with Here is another run |
|
I am a bit hesitant about this suggestion tbh. My concern is that an undocumented function could disappear with any new patch version of Mathematica, which would then render CANONICA unusable. And even though any performance improvement is certainly nice to have, I think a few per cent don't matter that much. So unless you have seen an example where this makes a more sizeable difference, I would suggest we keep this in mind and watch the Mathematica changelog, so we can incorporate it once it becomes a documented function. |
|
Well, Mathematica is not really known for being 100% backwards compatible and it is rather common What I mean is that permanent maintenance is anyhow a must to ensure the survival of the given package. Would it be acceptable for you to have a global switch, say something like |
|
I agree that maintenance for new major version will be necessary, I just want to avoid that happening on patch updates as well. That being said, if you can add a global switch like you suggested, people can use it at their own risk, so I'd be ok with that. |
Using the
Internal`LinearQroutine mentioned here one can roughly gain an order of magnitude speed up whencalling
LinearTestEqs.zip