Re:The V Programming Language 0.4
by amedvednikov on Tuesday August 29, 2023 @12:11PM
(#37310041)
The homepage makes it clear autofree is not ready yet and recommends 3 other ways to manage memory until it is.
You create an account to post the same message in all V posts. Why? :)
Re:The V Programming Language 0.4
by zamberzand on Tuesday August 29, 2023 @12:12PM
(#37310052)
Why isn't there a citation for this 90-100% number? I really am extremely curious where it comes from.
As for why I am posting a similar message (not nearly the same post, though) to you here as I did a year ago:
It is because I am very, very curious about where this number comes from and why there is no citation for it! It is fascinating to me.
(And, more generally, I have empirical experience with autofree that many users don't seem to have... so it seems useful to post about that experience to provide extra context for everyone else on this website).
There is no citation for where this 90-100% number comes from, it seems to be pulled completely out of thin air.
Autofree, as it currently exists, cannot handle structs at all, so any program whose memory allocations consist of more than 10% structs unfortunately proves this claim false.
For a specific example, a while ago I wrote a minimax tictactoe program in V, which specifically used a struct to store the board state rather than an array.
(see https://pastebin.com/6ZDKKRQR )
In this case, with the minimax running for 4 total moves, valgrind tells me:
So only 93212/161756 allocations were freed, which is 57%.... Now, I don't actually care that much that autofree doesn't work on structs. I think that's quite reasonable, as it's a very difficult thing to implement!
But, in my opinion, your website should really cite where this 90-100% number comes from, i.e. which benchmarks were used to generate it, so that it is clear that it isn't just completely made up.
(As it currently stands, I would argue this is false advertising specifically because there's no citation for this number!)