Support Board
Date/Time: Sat, 23 Nov 2024 11:56:21 +0000
Best load time (passing interface references as funcion arguements vs direct access)
View Count: 168
[2024-08-31 13:03:16] |
User907967 - Posts: 54 |
Hi, I'd like to gauge your thoughts on optimising a study using many subgraphs with 20+ functions. By 'optimise', I mean decreasing as much as possible the number of milliseconds it takes the script to load. Option 1: Using function arguments, I could try to carry over all the subgraph calls from one function to another. void AAA(SCSubgraphRef Subgraph_XXX, SCSubgraphRef Subgraph_YYY){
// Do work here } Option 2: I could access the subgraphs directly using the below from each function that needs to access subgraphs. void AAA(){
SCSubgraphRef XXX = sc.Subgraph[0]; SCSubgraphRef YYY = sc.Subgraph[1]; // Do work here } These options will not make much difference on a small scale, especially with today's CPU performance. Still, if one wishes to load 3-4 years of data, then I expect one option to be more efficient than the other and the difference to be noticeable. I appreciate any help you can provide. Date Time Of Last Edit: 2024-08-31 13:05:23
|
[2024-08-31 16:53:11] |
seandunaway - Posts: 268 |
it won't have any difference at all.. both are assembling to a call instruction with the difference only being the offsets from the frame pointer (function arguments versus locals) you still have to get sc into AAA anyways pretty much all of your performance improvements will come from just drawing or other io less frequently |
assembly.png / V - Attached On 2024-08-31 16:53:05 UTC - Size: 101.24 KB - 42 views |
[2024-09-02 15:08:32] |
Sierra_Chart Engineering - Posts: 17145 |
Yes there is no practical difference with timing between the two methods you show above. In each case references are being used. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2024-09-02 15:08:40
|
To post a message in this thread, you need to log in with your Sierra Chart account: