Skip to content
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

Add config options for Rust binding #422

Merged
merged 7 commits into from May 23, 2023
Merged

Add config options for Rust binding #422

merged 7 commits into from May 23, 2023

Conversation

chenyan-dfinity
Copy link
Contributor

@chenyan-dfinity chenyan-dfinity commented Apr 25, 2023

Partly fix #255

  • Globally apply type attributes
  • Special handle for blob type
  • Codegen for agent

@github-actions
Copy link

Benchmark for 13ef1b9

Click to view benchmark
Test Base PR %
Blob/&str 337.6±155.35µs 340.0±172.17µs +0.71%
Blob/ByteBuf 223.0±58.95µs 221.4±58.56µs -0.72%
Blob/Bytes 154.6±51.55µs 152.4±50.77µs -1.42%
Blob/String 387.3±172.26µs 394.1±172.61µs +1.76%
Collections/vec (text, nat) 89.7±3.06ms 89.7±2.36ms 0.00%
Collections/vec int 39.5±1.49ms 40.0±1.44ms +1.27%
Collections/vec int64 24.2±0.71ms 24.8±0.50ms +2.48%
Collections/vec nat8 17.6±0.69ms 18.3±1.07ms +3.98%
option list/1024 1698.0±78.35µs 1688.1±53.06µs -0.58%
profiles/1024 3.3±0.14ms 3.4±0.32ms +3.03%
variant list/1024 1357.7±107.41µs 1331.4±44.45µs -1.94%

@github-actions
Copy link

Benchmark for 61c01ee

Click to view benchmark
Test Base PR %
Blob/&str 262.8±86.39µs 268.2±84.88µs +2.05%
Blob/ByteBuf 173.9±52.68µs 176.5±54.49µs +1.50%
Blob/Bytes 117.8±38.80µs 121.3±40.24µs +2.97%
Blob/String 288.1±96.49µs 293.0±96.73µs +1.70%
Collections/vec (text, nat) 82.5±2.01ms 80.4±2.41ms -2.55%
Collections/vec int 36.5±0.76ms 36.1±0.87ms -1.10%
Collections/vec int64 21.3±0.65ms 21.1±0.63ms -0.94%
Collections/vec nat8 16.2±0.34ms 16.4±0.36ms +1.23%
option list/1024 1556.8±26.63µs 1539.6±38.13µs -1.10%
profiles/1024 3.0±0.05ms 3.2±0.07ms +6.67%
variant list/1024 1268.6±23.75µs 1231.9±29.61µs -2.89%

@github-actions
Copy link

Benchmark for 70174d4

Click to view benchmark
Test Base PR %
Blob/&str 191.1±64.02µs 183.9±64.79µs -3.77%
Blob/ByteBuf 134.7±48.98µs 134.8±48.36µs +0.07%
Blob/Bytes 96.6±33.14µs 97.3±33.87µs +0.72%
Blob/String 205.9±72.08µs 207.4±71.55µs +0.73%
Collections/vec (text, nat) 68.5±0.74ms 68.2±0.66ms -0.44%
Collections/vec int 30.9±0.10ms 30.7±0.09ms -0.65%
Collections/vec int64 16.9±0.22ms 16.6±0.25ms -1.78%
Collections/vec nat8 12.5±0.02ms 12.6±0.02ms +0.80%
option list/1024 1354.8±1.41µs 1349.8±1.66µs -0.37%
profiles/1024 2.6±0.01ms 2.6±0.01ms 0.00%
variant list/1024 1114.4±0.98µs 1110.2±0.85µs -0.38%

@github-actions
Copy link

github-actions bot commented May 3, 2023

Benchmark for d565b3e

Click to view benchmark
Test Base PR %
Blob/&str 187.7±65.00µs 187.3±65.75µs -0.21%
Blob/ByteBuf 136.3±49.21µs 136.7±49.34µs +0.29%
Blob/Bytes 97.3±34.52µs 97.5±34.48µs +0.21%
Blob/String 206.7±74.45µs 206.1±74.57µs -0.29%
Collections/vec (text, nat) 68.2±0.74ms 67.6±0.55ms -0.88%
Collections/vec int 30.6±0.13ms 30.5±0.07ms -0.33%
Collections/vec int64 16.5±0.26ms 16.7±0.19ms +1.21%
Collections/vec nat8 12.5±0.02ms 12.6±0.02ms +0.80%
option list/1024 1356.1±1.70µs 1377.7±17.64µs +1.59%
profiles/1024 2.6±0.01ms 2.6±0.00ms 0.00%
variant list/1024 1113.5±3.64µs 1118.9±12.01µs +0.48%

@chenyan-dfinity chenyan-dfinity marked this pull request as ready for review May 23, 2023 22:57
@chenyan-dfinity chenyan-dfinity merged commit fa29c70 into master May 23, 2023
4 checks passed
@chenyan-dfinity chenyan-dfinity deleted the import-config branch May 23, 2023 23:05
@github-actions
Copy link

Benchmark for 19832f7

Click to view benchmark
Test Base PR %
Blob/&str 278.5±141.13µs 261.3±135.27µs -6.18%
Blob/ByteBuf 193.9±78.64µs 187.3±53.91µs -3.40%
Blob/Bytes 139.8±67.93µs 126.5±49.51µs -9.51%
Blob/String 362.3±257.43µs 324.5±138.73µs -10.43%
Collections/vec (text, nat) 83.5±4.72ms 78.4±3.60ms -6.11%
Collections/vec int 37.6±2.47ms 35.5±2.10ms -5.59%
Collections/vec int64 19.6±1.29ms 19.9±0.98ms +1.53%
Collections/vec nat8 15.6±0.80ms 15.9±0.87ms +1.92%
option list/1024 1689.0±331.67µs 1561.2±99.30µs -7.57%
profiles/1024 3.1±0.17ms 3.0±0.18ms -3.23%
variant list/1024 1325.2±77.64µs 1213.2±48.45µs -8.45%

@github-actions
Copy link

Benchmark for a12d854

Click to view benchmark
Test Base PR %
Blob/&str 259.9±129.11µs 228.7±109.37µs -12.00%
Blob/ByteBuf 156.2±43.70µs 148.8±46.50µs -4.74%
Blob/Bytes 110.9±45.82µs 106.9±43.60µs -3.61%
Blob/String 303.5±146.36µs 268.1±120.68µs -11.66%
Collections/vec (text, nat) 71.1±1.09ms 70.3±1.12ms -1.13%
Collections/vec int 31.6±0.11ms 31.7±0.11ms +0.32%
Collections/vec int64 18.5±0.38ms 18.0±0.44ms -2.70%
Collections/vec nat8 14.0±0.02ms 14.0±0.02ms 0.00%
option list/1024 1373.1±2.59µs 1381.7±2.47µs +0.63%
profiles/1024 2.6±0.02ms 2.6±0.02ms 0.00%
variant list/1024 1120.9±8.17µs 1111.7±1.10µs -0.82%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Candid to Rust binding
2 participants