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

More work for Rust binding #461

Merged
merged 8 commits into from
Sep 6, 2023
Merged

More work for Rust binding #461

merged 8 commits into from
Sep 6, 2023

Conversation

chenyan-dfinity
Copy link
Contributor

@chenyan-dfinity chenyan-dfinity commented Aug 24, 2023

Part of #255

  • Generated names conform to Rust convention: Pascal case for type names and enum tags; snake case for function names.
  • Fix problems for agent code
  • Fix a bug when deriving empty struct/tuple enum tag, e.g., #[derive(CandidType)] enum T { A{}, B() }.

@github-actions
Copy link

Benchmark for 695d419

Click to view benchmark
Test Base PR %
Blob/&str 291.0±136.73µs 286.1±144.14µs -1.68%
Blob/ByteBuf 212.9±54.76µs 212.3±58.18µs -0.28%
Blob/Bytes 141.2±44.77µs 142.4±49.22µs +0.85%
Blob/String 356.5±155.49µs 350.9±172.24µs -1.57%
Collections/vec (text, nat) 81.4±3.74ms 81.3±3.88ms -0.12%
Collections/vec int 35.7±1.47ms 37.2±2.36ms +4.20%
Collections/vec int64 20.1±1.22ms 19.9±0.98ms -1.00%
Collections/vec nat8 15.4±0.59ms 15.3±0.69ms -0.65%
option list/1024 1626.7±77.58µs 1615.5±67.31µs -0.69%
profiles/1024 3.1±0.12ms 3.0±0.11ms -3.23%
variant list/1024 1277.9±58.06µs 1277.7±53.48µs -0.02%

@github-actions
Copy link

Benchmark for e154897

Click to view benchmark
Test Base PR %
Blob/&str 200.8±76.27µs 196.2±63.96µs -2.29%
Blob/ByteBuf 142.5±48.31µs 140.4±50.04µs -1.47%
Blob/Bytes 98.9±35.15µs 102.2±34.71µs +3.34%
Blob/String 213.0±75.59µs 218.9±76.40µs +2.77%
Collections/vec (text, nat) 62.2±0.83ms 62.9±0.83ms +1.13%
Collections/vec int 30.0±0.09ms 30.2±0.08ms +0.67%
Collections/vec int64 17.3±0.31ms 17.5±0.23ms +1.16%
Collections/vec nat8 13.2±0.08ms 13.1±0.08ms -0.76%
option list/1024 1332.4±2.17µs 1367.0±41.55µs +2.60%
profiles/1024 2.6±0.00ms 2.6±0.00ms 0.00%
variant list/1024 1137.8±4.62µs 1135.7±4.10µs -0.18%

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Benchmark for 8765f1f

Click to view benchmark
Test Base PR %
Blob/&str 242.3±75.73µs 216.6±58.65µs -10.61%
Blob/ByteBuf 143.9±48.34µs 144.9±47.58µs +0.69%
Blob/Bytes 101.8±44.07µs 101.7±44.03µs -0.10%
Blob/String 313.6±155.72µs 303.3±144.38µs -3.28%
Collections/vec (text, nat) 65.0±0.87ms 65.0±1.10ms 0.00%
Collections/vec int 32.5±0.09ms 32.2±0.03ms -0.92%
Collections/vec int64 16.7±0.08ms 17.4±0.13ms +4.19%
Collections/vec nat8 14.3±0.01ms 14.2±0.01ms -0.70%
option list/1024 1383.3±1.40µs 1390.6±2.30µs +0.53%
profiles/1024 2.7±0.04ms 2.7±0.03ms 0.00%
variant list/1024 1133.1±1.57µs 1124.7±0.86µs -0.74%

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Benchmark for c46c63a

Click to view benchmark
Test Base PR %
Blob/&str 249.1±70.08µs 238.1±68.58µs -4.42%
Blob/ByteBuf 158.4±43.70µs 160.3±42.75µs +1.20%
Blob/Bytes 116.2±41.88µs 116.4±41.29µs +0.17%
Blob/String 316.2±145.72µs 308.7±145.00µs -2.37%
Collections/vec (text, nat) 69.3±0.75ms 69.3±1.32ms 0.00%
Collections/vec int 33.0±0.06ms 33.5±0.05ms +1.52%
Collections/vec int64 18.4±0.14ms 19.8±0.15ms +7.61%
Collections/vec nat8 14.4±0.02ms 14.3±0.03ms -0.69%
option list/1024 1396.2±2.97µs 1395.0±3.33µs -0.09%
profiles/1024 2.7±0.01ms 2.7±0.00ms 0.00%
variant list/1024 1137.0±1.59µs 1125.0±1.39µs -1.06%

@chenyan-dfinity chenyan-dfinity merged commit dbee878 into master Sep 6, 2023
3 checks passed
@chenyan-dfinity chenyan-dfinity deleted the rust-binding branch September 6, 2023 16:36
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.

2 participants