[llvm-dev] High Performance containers
Francois Fayard via llvm-dev
llvm-dev at lists.llvm.org
Thu Aug 17 04:39:40 PDT 2017
Hi Dean. Thanks for your reply.
The ADT library is exactly what I end up replicating. My library started 2 years ago and at the beginning, what I needed was very different from LLVM. My first containers were:
- A custom std::vector that does not initialize elements to 0 for int, double, etc. This is very important in HPC for the first touch policy used on NUMA architectures. It also allows alignement to vector width which can be important for performance with vectorization.
- A small size optimized vector
- Multidimensional arrays
That’s later, when I discovered Chandler Carruth’s talks, that I discovered that I was not the only one having issues with the STL. My hash map, is almost the same as LLVM one. I also have a hash set, a view on a string, and a unicode friendly string which can handle UTF8 as an invariant and which is implemented the same way std::string is implemented in libc++.
Where I might bring some help, is with the probing method in map and with the default hashing functions. There are some hashing strategies such as robin hood hashing that might be worth trying. Also I know, that the hashing strategy for integers in LLVM is suboptimal. But I am not sure it would give a lot of help as I don’t think LLVM hashes a lot on integers.
François Fayard
> On Aug 17, 2017, at 10:23 AM, Dean Michael Berris <dean.berris at gmail.com> wrote:
>
> Hi Francois,
>
> Have you looked at the ADT library in LLVM, and have you considered contributing to LLVM directly (and improving the available data structures / algorithms in the codebase)?
>
> I understand that might not meet the goal of something that is released and supported by the LLVM project (i.e. a standalone containers/adapters library) but I suspect something that developers working on LLVM passes and/or the compilers can use.
>
> Good luck with the project, BTW. :)
>
> Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170817/32df1584/attachment.html>
More information about the llvm-dev
mailing list