-
Notifications
You must be signed in to change notification settings - Fork 119
Merge new aggregation logic into pyth-client (on behalf of kbowers) #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ndalone off chain test suite
…ain with off-chain standalone tests
…AP / TWAC model (log2 and signed magnitude helpers)
|
|
||
| /* Extract the p25 | ||
|
|
||
| There are many variants with subtle tradeoffs here. One option is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thinking about this for a while, I believe this is correct. However, this comment confused me a bit because it was hard to reason through the indexes pointed to by the various floor / ceils. I suggest revising this paragraph to:
"There are many variants of the p25 in the case where the number of samples cnt is divisible by 4. When cnt is not divisible by 4, then floor(cnt / 4) always gives you the p25. When cnt is divisible by 4, the p25 falls between the samples x = (floor(cnt/4) -1) and y = floor(cnt/4)."
Then describe the variants in terms of x and y
| /* Optimized handling of base cases */ | ||
|
|
||
| # include "sort_stable_base.c" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't actually see SORT_STABLE_CE being used anywhere here (?)
| /* If left subsort result ended up in orig array, merge into temp | ||
| array. Otherwise, merge into orig array. */ | ||
|
|
||
| if( yl==xl ) x = t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by how this function handles the two arrays. Does it flip back and forth between putting the results in the original array and the temp array? Maybe worth a comment
| } | ||
| } | ||
|
|
||
| # if 0 /* These variants of the above don't seem to produce much better code */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this block since it isn't used (?)
…ich in turn needs a 128-bit wide subtraction (and other minor cleanups).
…level component testing
| Note: price_model_cnt_valid( cnt ) implies | ||
| int64_sort_ascending_cnt_valid( cnt ) currently. | ||
|
|
||
| Note: consider filtering out "NaN" quotes (i.e. INT64_MIN)? */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what situation we might get "NaN" quote?
… component testing
…er level component testing
…model code can isolated to its own compilation unit
… the pc_price_t layout for time being)
|
superseded by #145 |
No description provided.