-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat!: optimize and rework send()
function
#1650
Conversation
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.
Super-awesome stuff 🎸 Let's update the Jetton benchmarks
I think all those inline comments make the code harder to read. We should
|
I've edited the By the way, we also need a note on |
Co-authored-by: Anton Trunov <anton@tonstudio.io>
UPD: Value of Now that I think about it, we're (potentially) making a breaking change here compared to the non-asm version of the function: #1650 (comment) Instead of adding the Otherwise:
P.S.: But I may be totally off here, so I'll write some tests :) |
I actually left previous behaviour |
Yeah, and I overlooked it in the previous PR. The behavior prior to all asm changes was: extends fun readForwardFee(self: Context): Int {
let sc: Slice = self.raw;
sc.loadAddress(); // Skip destination
sc.loadCoins(); // Skip value
sc.skipBits(1); // Skip extra currency collection
sc.loadCoins(); // Skip ihr_fee
return (sc.loadCoins() * 3) / 2;
} Which, roughly speaking, was producing halved result of the current iteration of |
@novusnota can you please suggest tests to see if your considerations are taken into account here |
Hmm, I did some local checks and @Shvandre is right, things are still ok. Sorry everyone, false alarm from me :): That said, I'll add e2e tests to encode the behavior |
Issue
Closes #1649
Closes #1558
Checklist
Results (two last rows):
![image](https://private-user-images.githubusercontent.com/91282981/408303334-14658852-e5d2-49ba-9231-757f25583921.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MTY4MzksIm5iZiI6MTczODgxNjUzOSwicGF0aCI6Ii85MTI4Mjk4MS80MDgzMDMzMzQtMTQ2NTg4NTItZTVkMi00OWJhLTkyMzEtNzU3ZjI1NTgzOTIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA0MzUzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5MTQxYWMzNjlmOTE1YTlkOThlMmYwMDliZGJiNjVkMzk2ODAzZjc4ZGFmMGExMzBiNGYyODBjMjAzOTIxNzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4lt1FMnexLPJmfiimCTru3oIAU_sP-QK3QmcR3ZihGo)