Skip to content

Commit 35002e3

Browse files
authored
refactor(codegen): optimize store_slice function (#3213)
1 parent 9480b48 commit 35002e3

File tree

16 files changed

+347
-240
lines changed

16 files changed

+347
-240
lines changed

dev-docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- [fix] Disallow self-inheritance for contracts and traits: PR [#3094](https://github.com/tact-lang/tact/pull/3094)
1313
- [fix] Added fixed-bytes support to bounced message size calculations: PR [#3129](https://github.com/tact-lang/tact/pull/3129)
14+
- Compiler now generates more efficient code for serialization: PR [#3213](https://github.com/tact-lang/tact/pull/3213)
1415

1516
### Docs
1617

src/benchmarks/escrow/results_code_size.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@
7979
"cells": "20",
8080
"bits": "11575"
8181
}
82+
},
83+
{
84+
"label": "1.6.10 with store_slice optimization",
85+
"pr": "https://github.com/tact-lang/tact/pull/3213",
86+
"size": {
87+
"cells": "20",
88+
"bits": "11327"
89+
}
8290
}
8391
]
8492
}

src/benchmarks/escrow/results_gas.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,16 @@
229229
"approveTon": "6738",
230230
"cancelTon": "4639"
231231
}
232+
},
233+
{
234+
"label": "1.6.10 with store_slice optimization",
235+
"pr": "https://github.com/tact-lang/tact/pull/3213",
236+
"gas": {
237+
"fundingTon": "4303",
238+
"changeCode": "4394",
239+
"approveTon": "6738",
240+
"cancelTon": "4639"
241+
}
232242
}
233243
]
234244
}

src/benchmarks/jetton/results_code_size.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@
139139
"wallet cells": "16",
140140
"wallet bits": "8195"
141141
}
142+
},
143+
{
144+
"label": "1.6.10 with store_slice optimization",
145+
"pr": "https://github.com/tact-lang/tact/pull/3213",
146+
"size": {
147+
"minter cells": "27",
148+
"minter bits": "14225",
149+
"wallet cells": "14",
150+
"wallet bits": "7884"
151+
}
142152
}
143153
]
144154
}

src/benchmarks/jetton/results_gas.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,15 @@
359359
"burn": "11812",
360360
"discovery": "6161"
361361
}
362+
},
363+
{
364+
"label": "1.6.10 with store_slice optimization",
365+
"pr": "https://github.com/tact-lang/tact/pull/3213",
366+
"gas": {
367+
"transfer": "14859",
368+
"burn": "11728",
369+
"discovery": "6135"
370+
}
362371
}
363372
]
364373
}

src/benchmarks/nft/results_code_size.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@
139139
"item cells": "10",
140140
"item bits": "5625"
141141
}
142+
},
143+
{
144+
"label": "1.6.10 with store_slice optimization",
145+
"pr": "https://github.com/tact-lang/tact/pull/3213",
146+
"size": {
147+
"collection cells": "38",
148+
"collection bits": "20444",
149+
"item cells": "10",
150+
"item bits": "5609"
151+
}
142152
}
143153
]
144154
}

src/benchmarks/nft/results_gas.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@
129129
"deploy nft": "10683",
130130
"batch deploy nft": "663906"
131131
}
132+
},
133+
{
134+
"label": "1.6.10 with store_slice optimization",
135+
"pr": "https://github.com/tact-lang/tact/pull/3213",
136+
"gas": {
137+
"transfer": "7307",
138+
"get static data": "4697",
139+
"deploy nft": "10661",
140+
"batch deploy nft": "664054"
141+
}
132142
}
133143
]
134144
}

src/benchmarks/notcoin/results_code_size.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@
7979
"wallet cells": "14",
8080
"wallet bits": "8068"
8181
}
82+
},
83+
{
84+
"label": "1.6.10 with store_slice optimization",
85+
"pr": "https://github.com/tact-lang/tact/pull/3213",
86+
"size": {
87+
"minter cells": "28",
88+
"minter bits": "15764",
89+
"wallet cells": "13",
90+
"wallet bits": "7844"
91+
}
8292
}
8393
]
8494
}

src/benchmarks/notcoin/results_gas.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@
6262
"burn": "11919",
6363
"discovery": "5870"
6464
}
65+
},
66+
{
67+
"label": "1.6.10 with store_slice optimization",
68+
"pr": "https://github.com/tact-lang/tact/pull/3213",
69+
"gas": {
70+
"transfer": "15759",
71+
"burn": "12011",
72+
"discovery": "5716"
73+
}
6574
}
6675
]
6776
}

src/benchmarks/sbt/results_code_size.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@
5555
"item cells": "17",
5656
"item bits": "9905"
5757
}
58+
},
59+
{
60+
"label": "1.6.10 with store_slice optimization",
61+
"pr": "https://github.com/tact-lang/tact/pull/3213",
62+
"size": {
63+
"item cells": "17",
64+
"item bits": "9801"
65+
}
5866
}
5967
]
6068
}

0 commit comments

Comments
 (0)