I have this Ubuntu C++ package. Everything works but I need it to work as fast as it can, so I am trying to salvage microseconds. I want to make sure that when I pass an array of doubles to a subroutine, only a pointer is passed because this subroutine is a part of a loop and I don't want this array to be passed naked so many times. I know that an address should be passed but I need a confirmation, because on the bottom of my soul I have ridiculous doubts. Thanks, - A.
If you really don't trust it, then explicitly pass the address of the first element in the array.
Then, profile your code as it runs and work out where the time is actually being spent, so you fix things that definitely make it faster instead of guessing.
Thank you. The reason I am not using vectors is that I need complex<double> and also a "devotion" to tradition, or simply a habit.
Thanks, - A.
Last edited on
vector<complex<double>> should solve the first of those. Fixing the second is up to you.