4 ms·
Bingo, if you want cache aware programs C++ is really the only language widely used(although I'd love to see Rust supplant it).
by vvanders 11y ago
Bingo, if you want cache aware programs C++ is really the only language widely used(although I'd love to see Rust supplant it).
- pjmlp 11y agoWrong. .NET provides all the tools to write cache friendly programs. That many devs use it like Java is another matter. If we include high integrity systems there is Ada as well, even though it is a niche.
- berkut 11y agoReally? So you can completely control the layout of where items on the heap are allocated, get hold of pointer addresses, and store things within the least significant bits (for tagged pointers)?
- pjmlp 11y agoFor Ada, yes to all your points. For .NET, almost with a few additional tricks. - Value types - Struct layout attributes - Field offsets. - Arrays with value types - Unsafe - Interop with native buffers - Buffer manipulation with custom serialisers Your challenge can be fulfilled with getting a native buffer, with a custom serialiser and a few unsafe tricks. As a matter of fact, you just gave me a mini project idea. Lets see if I am up for the challenge or need to eat my own words. Meanwhile here is an example what C# devs are able to achieve, when they know how to explore the tooling properly. http://www.infoq.com/articles/Big-Memory-Part-2 http://www.infoq.com/articles/Big-Memory-Part-2 I am an old C++ dog since the C++ ARM days, meanwhile busy with other languages.
- srean 11y agoOK then a pointer to a .NET linear algebra library that works on floats and is in the ballpark of Eigen benchmarks please (I wouldn't call Eigen bleeding edge, but one that eets common expectation of performance.). Another one for scientific computation would be much appreciated. Numpy/Scipy are slow, but anything that's in their ballpark of ease of use and speed would be good to have. At least .NET interfacing is not JNI .... small mercies. I am not being snarky, such libraries would help me a great deal.
- pjmlp 11y agoI don't know if you will be happy with these ones, but I don't have any experience in your domain. http://www.roguewave.com/products-services/imsl-numerical-libraries/net-libraries http://www.roguewave.com/products-services/imsl-numerical-li... http://quantalea.com/highlights/ http://quantalea.com/highlights/ I do concede that my remark was a bit flame-bait, but as I replied on a sibling thread, there are mechanisms available that allow for cache friendlier code, while staying inside .NET. It is going to outperform or be shoulder-to-shoulders to an optimizing C++ compiler? Most likely not (lets see how .NET Native evolves), but in certain use cases will be already fast enough. The problem is that many see .NET as Java clone, as I once did as well, Microsoft and miss to explore the mechanisms .NET has available for a bit closer to the metal coding. Many times 90% there is already a solution costumers will appreciate. Plus there are plans to bring more of their learnings from System C# (aka M#) and project Midori into .NET. http://joeduffyblog.com/2015/11/03/blogging-about-midori/ http://joeduffyblog.com/2015/11/03/blogging-about-midori/
- srean 11y agoThanks for replying. I checked out the links, thanks again for them. However nothing looked like anything I can use. In theory .NET can do a whole lot of things, but I have been waiting for this hole to be filled for a long time. So far there is nothing even remotely useful as Eigen, Armadillo and their ilk. Heck, there isn't even a standard sin, cos exp log etc. for floats. Not a place where a number-cruncher will feel at home.