|
|
|
|
|
by zozbot234
484 days ago
|
|
I think the "backwards in time" aspect can most easily be understood as a consequence of (A -> B) being the same as (~B -> ~A). That is, if you know how to go from A to B, then instead of requesting B it's enough to request A. Though this can be applied more generally to a "logic of resources" which then also requires multiple varieties of the "struct" and "enum" construct, depending on whether the "producer" or "requester" side is making a choice. |
|
I guess I'm still in the edit window. I installed it. Naturally once of its hundreds of dependencies needed a newer rustc than the 22.04 PPA but whatever, got that sorted. Turns out it doesn't compile down into assembly but if I'd kept reading I would've seen that it goes to Ivy, an intermediate language that's run later. Running the example gives:
> vine run vine/examples/sub_min.vi [1, 0, 4, 6]
Interactions Total 948 Annihilate 491 Commute 21 Copy 88 Erase 102 Expand 142 Call 63 Branch 41
Memory Heap 1_184 B Allocated 19_520 B Freed 19_520 B
Performance Time 0 ms Speed 6_245_059 IPS
Apparently the stats are default. Which makes this feel like a toy but again, whatever. Running that first way gives:
Interactions Total 1_069 Annihilate 562 Commute 21 Copy 96 Erase 114 Expand 163 Call 67 Branch 46
Memory Heap 1_184 B Allocated 22_000 B Freed 22_000 B
Performance Time 0 ms Speed 7_088_859 IPS
IPS seems quite variable at this small an input size. So my conclusion is: if it helps one write code better, go for it. Who cares. But this certainly doesn't seem like some magic bullet that doesn't need to go through the array twice. The ivy code is not very human friendly so I couldn't wrap my head around what it's actually doing, but it looks like it's a bunch of functional programming. It really does look quite slow and mathematically pure. So as a math toy I think it's doing a good job.