I forgot that the purpose of your site is comparing the number of mults. A more compatible idea is to rearrange the nodes so that any repeated squaring is always in a single row at the top. The graph would have the same nodes and connectivity, but a more structured flow. If I ever make my own comparison of polynomial evaluation strategies I'll do manual layout.
For completeness: To apply my original idea to R&W9 you would have 5 nodes labeled x, each with one arrow out, two nodes labeled x^2, each with no arrows in and one arrow out, one node labeled x^4 with no arrows in and one arrow out, one node labeled x^8 with no arrows in and one arrow out. Three missing mults, but way fewer crossings, not what you want.
Comments
Thank you! It was a lot of fun to make the website and see all the methods in practice after having just looked at the theory for a long time :D
Do you mean a graph like this R&W? https://thomasahle.com/fast-polynomials/#ex=bessel&mode=Q&me... there are nodes labeled x2, x4, x8; but it's the output of multiplications, and we want to make the number of mults visually clear.
I forgot that the purpose of your site is comparing the number of mults. A more compatible idea is to rearrange the nodes so that any repeated squaring is always in a single row at the top. The graph would have the same nodes and connectivity, but a more structured flow. If I ever make my own comparison of polynomial evaluation strategies I'll do manual layout.
For completeness: To apply my original idea to R&W9 you would have 5 nodes labeled x, each with one arrow out, two nodes labeled x^2, each with no arrows in and one arrow out, one node labeled x^4 with no arrows in and one arrow out, one node labeled x^8 with no arrows in and one arrow out. Three missing mults, but way fewer crossings, not what you want.
I'm happy to take a PR if you have a good layout in mind!