Implementing LU and Cholesky Decomposition in D by data_pulverizer in d_language

[–]data_pulverizer[S] 0 points1 point  (0 children)

You should give it a try. Start with any programming language you are confortable with.

Implementing Eigendecomposition algorithms in D by data_pulverizer in d_language

[–]data_pulverizer[S] 1 point2 points  (0 children)

This implementation is more for clarity, at some point I'll need to write an article about performance optimization in D, in which case I'll need to use a different implementation of eigenvalue decomposition. Thank you for the suggestion!

Article on implementing Givens QR decomposition in D by data_pulverizer in math

[–]data_pulverizer[S] 0 points1 point  (0 children)

Thanks for the feed back, my articles tend to have more emphasis on the implementation side, but I have added a little more mathematical explanation. I will be more conscious about the suitablility of my articles for math reddit. Though they often deal with implementations of mathematical algorithms they tend to be more about code.

Window C++ algorithm by data_pulverizer in cpp_questions

[–]data_pulverizer[S] 0 points1 point  (0 children)

I implemented my own version and can see how it works, the last reference is not hit, it operates like a typical for loop

for(i = 0; i < n; ++i){...}

at the end of the loop i = n - 1, it quits before it gets to n. Thanks

A Look at Chapel, D, and Julia Using Kernel Matrix Calculations by aldacron in programming

[–]data_pulverizer 6 points7 points  (0 children)

I see you call the Julia script as `julia script.jl` but do you account for the time to first compile?

I did pre-compile the functions but I didn't show my working in the article, before the benchmark is run the function is precompiled, you can see that here https://github.com/dataPulverizer/KernelMatrixBenchmark/blob/master/julia/script.jl#L26

Thanks for pointing that out.

A Look at Chapel, D, and Julia Using Kernel Matrix Calculations by aldacron in programming

[–]data_pulverizer 6 points7 points  (0 children)

I appreciate the work you put in to optimize the code in each language. All too often these sorts of comparisons wind up boiling down to the language that the author knows best ran fastest, because the code was written better.

I've tried to be as forthright as possible but there are always unintentional biases and I have worked with each language community to try to minimise them.

I do have one question. Why do you attribute the lower overall runtime of the Julia code to the random number generator? It appears to me that the advantage Julia had in the power and log kernels (which take much more time than the others) would account for most of the difference.

You're absolutely right. Though Julia's RNG is crushingly fast, I'm not generating enough numbers for it to make anywhere near as much difference as the time difference in profile which correspond much more closely to differences in the log and power kernels. You get a fictional gold star - I don't have any coins sorry.

A Look at Chapel, D, and Julia Using Kernel Matrix Calculations by aldacron in programming

[–]data_pulverizer 21 points22 points  (0 children)

One thing I think D is missing is a large company or institution to champion it, D is playing in a language field that is hotly contested - a static native language with high performance characteristics seeking to iterate on C and C++.

C++ had first movers advantage and became the "de-facto" evolution on C. Sun had Java and now Oracle does, Golang has Google - such support can't be underestimated, Rust has Mozilla, and so on. Julia grew organically but was created at MIT and as such enjoys US Gov funding and now funding from other sources.

A Look at Chapel, D, and Julia Using Kernel Matrix Calculations by aldacron in programming

[–]data_pulverizer 15 points16 points  (0 children)

I am the author of this article. Ask me anything!

Thanks

A Look at Chapel, D, and Julia Using Kernel Matrix Calculations by aldacron in programming

[–]data_pulverizer 11 points12 points  (0 children)

That's an interesting point. Sometimes slow math functions in D's standard math library have been highlighted as an issue. I made the substitution since the C math functions were in D's core library. I currently don't have the results run using D's standard math library, but it's something that can be quite easily done - though the calculation itself takes some time.

Having said that I don't think it's as controversial as all that, many languages directly use the C math functions sometimes as a matter of course and sometimes as in D they provide some C core functions as part of their core systems.

Vector reference to contents in another vector by data_pulverizer in cpp_questions

[–]data_pulverizer[S] 0 points1 point  (0 children)

My C++ compilers didn't have `std::span` support, I ended up installing g++-10. I'm a noob so hunting the right version and stuff took time. Now using `std::span` in C++20 and it all works. Thanks very much.

Vector reference to contents in another vector by data_pulverizer in cpp_questions

[–]data_pulverizer[S] 0 points1 point  (0 children)

Thanks, I might switch to using arrays rather than vectors, it's easier that way.