Hacker News new | ask | show | jobs
by xanthine 1237 days ago
It is indeed a bit too long. A few tips:

- Graphs of benchmark results would be neat to have. Remember to put the code and graphs as a sort of TL;DR in that blog post. - I skimmed the code; there's no clear instructions as to how I'd use it for my own projects. Perhaps work on a CMake / Autoconf config for a library build? - The repository itself might not have enough visibility due to being self hosted. While I do love self-hosting, maybe posting a read-only mirror on GitHub would bring in more exposure?

1 comments

> Graphs of benchmark results would be neat to have. Remember to put the code and graphs as a sort of TL;DR

Thanks for the suggestion. I’ll use it when I get around to updating this page. For now though I’ll let it sit there, as I’m too tired with it at this point.

> there's no clear instructions as to how I'd use it for my own projects. Perhaps work on a CMake / Autoconf config for a library build?

It’s not meant to be used as a library. It’s only for demonstrative purposes. There are a couple choices made in this code motivated by that, like not checking for integer overflow, or hardcoding page size based on the target platform at compile time. If someone wants to use the code anyway, they should just copy it into their project and possibly modify the parts which aren’t up to snuff. That’s also what I’m doing, as I wrote a more robust version in Rust for my project. I only wrote C++ for the article, because that’s what more people are familiar with, and there are more implementations, so I got to benchmark this code against several implementations of std::vector.

As for CMake/Autotools, I think the scripts in the repo are better for my little demo, as they don’t add any dependencies beyond what’s already available on each platform, they’re more transparent and easier to use. For a big project I’d probably use CMake, but I don’t think it’s warranted here.

> The repository itself might not have enough visibility due to being self hosted. While I do love self-hosting, maybe posting a read-only mirror on GitHub would bring in more exposure?

The intended path of discovery, when it comes to the repo, is through my article. It’s not meant to be independent, so I don’t really care about the discoverability of the repo as a stand-alone thing. As for GitHub, I don’t like it for a variety of reasons and if I can help it, I’ll avoid it.