Errors, bugs, questions - page 2506

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Justify
Registers are measured in bits, not bytes. Therefore this line is used incorrectly in the rest of the code:
Registers are measured in bits, not bytes. Therefore this line is used incorrectly in the rest of the code:
No, you are saying something strange. I'm not going to prove it. Look at the documentation on the processor, read here https://stackoverflow.com/questions/7281699/aligning-to-cache-line-and-knowing-the-cache-line-size/7284876
I don't need registers, I'm not talking about them at all.
No, you are saying something strange. I'm not going to prove it. Look at the documentation for the processor, read here https://stackoverflow.com/questions/7281699/aligning-to-cache-line-and-knowing-the-cache-line-size/7284876
I don't need registers, I'm not talking about them at all.
Hmm... Okay. (clears throat) Anyway, the cache varies from model to model. There's no way to know its size from the software. That's why it's silly to take it as a guide. But all the processors have two types of registers and it is the size of registers that skilled programmers focus on. And even this register-orientation is not always successful because between the program and the processor there are a compiler and an operating system.
Besides this line is calculated incorrectly and without registers:
Hmm... Okay. Anyway, the cache varies from processor to processor. And there's no way to know its size from the software. That's why it's silly to be guided by it. But all the processors have two types of registers and it is the size of registers that skilled programmers focus on. And even register-size targeting does not always save you because the compiler and operating system are situated between the program and the processor.
Again, things are evolving, more and more emphasis is placed on multithreading, and here's a cross std library to tell you all about it
https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
Again no, things are evolving, more and more emphasis is placed on multithreading, and here you go - the cross std library will tell you everything
https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
Maybe, but so far you haven't convinced me.It won't tell you, it will tell you. Read the specification carefully.
Forum on trading, automated trading systems and testing of trading strategies
Maybe, but so far you haven't convinced me.
Although I'm not quite sure what shift you wanted, but it's easy to understand: an absolute address is completely useless in calculations. Have you forgotten that the reference point for memory is the address of the structure? And you probably wanted to get the offset of an array in a block of structure memory? And that turns out to be the difference of addresses of the structure and the zero element of the array.
If there is no value in the buffer on the bar, it should be explicitly written in the buffer. I.e., if the calculated value should be output to the buffer - we write it to the buffer, otherwise - we write an empty value.
Thank you, Artem.
Although I'm not quite sure what offset you wanted, it's easy to understand the bug: an absolute address is completely useless in calculations. Have you forgotten that the memory reference point is the structure address? And you probably wanted to get the offset of an array in a block of structure memory? And that's the difference between the addresses of the structure and the zero element of the array.
Actions in order:
1 - get the address of the first ar[] element in the current data structure.
2. find out its offsets from the beginning of cache line
3. find out how many bytes from it to the end of cache line
4. find out how many bytes will fit into this space till the end of the cache line.
Did you run it on your computer? Is there a difference in speed? Or is it just me?
2. find out its offsets from the start of the cache line
What makes you think that's any way to find out its offset?
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
fxsaber, 2019.07.09 11:13
Data data[]; ArrayResize(data, 32768);
There is a 6x slowdown happening!
What are these brakes for?