-
Notifications
You must be signed in to change notification settings - Fork 79
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
[Feature] __contains__, clear and fromkeys #721
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
---|---|---|---|---|---|
test_plain_set_nested | 35.6860μs | 16.8606μs | 59.3099 KOps/s | 59.4794 KOps/s | |
test_plain_set_stack_nested | 43.2710μs | 17.1075μs | 58.4540 KOps/s | 59.1261 KOps/s | |
test_plain_set_nested_inplace | 52.6370μs | 19.1135μs | 52.3190 KOps/s | 51.7269 KOps/s | |
test_plain_set_stack_nested_inplace | 69.8300μs | 19.1328μs | 52.2663 KOps/s | 52.6987 KOps/s | |
test_items | 23.9840μs | 2.4210μs | 413.0555 KOps/s | 405.4716 KOps/s | |
test_items_nested | 0.4477ms | 0.2655ms | 3.7670 KOps/s | 3.7036 KOps/s | |
test_items_nested_locked | 0.9591ms | 0.2700ms | 3.7032 KOps/s | 3.7286 KOps/s | |
test_items_nested_leaf | 0.3418ms | 0.1657ms | 6.0364 KOps/s | 6.0363 KOps/s | |
test_items_stack_nested | 0.3794ms | 0.2687ms | 3.7221 KOps/s | 3.5092 KOps/s | |
test_items_stack_nested_leaf | 0.5115ms | 0.1640ms | 6.0992 KOps/s | 5.9697 KOps/s | |
test_items_stack_nested_locked | 0.4030ms | 0.2675ms | 3.7383 KOps/s | 3.6794 KOps/s | |
test_keys | 25.5380μs | 4.0182μs | 248.8693 KOps/s | 258.1762 KOps/s | |
test_keys_nested | 2.3715ms | 0.1441ms | 6.9384 KOps/s | 6.9198 KOps/s | |
test_keys_nested_locked | 0.2557ms | 0.1476ms | 6.7744 KOps/s | 6.7253 KOps/s | |
test_keys_nested_leaf | 33.2724ms | 0.1298ms | 7.7050 KOps/s | 7.9769 KOps/s | |
test_keys_stack_nested | 0.2433ms | 0.1461ms | 6.8445 KOps/s | 6.9000 KOps/s | |
test_keys_stack_nested_leaf | 0.2482ms | 0.1260ms | 7.9375 KOps/s | 7.9950 KOps/s | |
test_keys_stack_nested_locked | 0.2388ms | 0.1495ms | 6.6895 KOps/s | 6.6923 KOps/s | |
test_values | 5.2798μs | 1.1767μs | 849.8372 KOps/s | 722.3919 KOps/s | |
test_values_nested | 0.1063ms | 51.2410μs | 19.5156 KOps/s | 19.7815 KOps/s | |
test_values_nested_locked | 0.1093ms | 50.8225μs | 19.6763 KOps/s | 19.8038 KOps/s | |
test_values_nested_leaf | 92.9320μs | 45.8716μs | 21.8000 KOps/s | 21.7559 KOps/s | |
test_values_stack_nested | 0.1019ms | 51.6935μs | 19.3448 KOps/s | 19.8431 KOps/s | |
test_values_stack_nested_leaf | 88.4640μs | 44.6282μs | 22.4073 KOps/s | 21.8944 KOps/s | |
test_values_stack_nested_locked | 0.1395ms | 51.7202μs | 19.3348 KOps/s | 19.7963 KOps/s | |
test_membership | 13.8460μs | 1.3296μs | 752.0995 KOps/s | 735.0199 KOps/s | |
test_membership_nested | 19.8460μs | 3.3722μs | 296.5393 KOps/s | 291.2317 KOps/s | |
test_membership_nested_leaf | 27.6910μs | 3.4106μs | 293.2021 KOps/s | 283.4860 KOps/s | |
test_membership_stacked_nested | 26.3180μs | 3.3730μs | 296.4720 KOps/s | 275.1975 KOps/s | |
test_membership_stacked_nested_leaf | 25.5770μs | 3.4053μs | 293.6578 KOps/s | 284.7798 KOps/s | |
test_membership_nested_last | 25.9680μs | 4.1644μs | 240.1334 KOps/s | 237.0784 KOps/s | |
test_membership_nested_leaf_last | 37.9000μs | 4.1906μs | 238.6309 KOps/s | 235.2754 KOps/s | |
test_membership_stacked_nested_last | 23.1920μs | 5.7589μs | 173.6452 KOps/s | 240.6268 KOps/s | |
test_membership_stacked_nested_leaf_last | 26.0180μs | 5.7125μs | 175.0545 KOps/s | 237.5080 KOps/s | |
test_nested_getleaf | 47.3070μs | 10.6582μs | 93.8249 KOps/s | 94.1165 KOps/s | |
test_nested_get | 33.8430μs | 10.0688μs | 99.3163 KOps/s | 100.1459 KOps/s | |
test_stacked_getleaf | 35.1750μs | 10.6733μs | 93.6921 KOps/s | 95.1594 KOps/s | |
test_stacked_get | 51.7650μs | 9.8820μs | 101.1938 KOps/s | 100.7794 KOps/s | |
test_nested_getitemleaf | 34.1030μs | 11.3373μs | 88.2043 KOps/s | 89.2736 KOps/s | |
test_nested_getitem | 31.3980μs | 10.3737μs | 96.3974 KOps/s | 97.4330 KOps/s | |
test_stacked_getitemleaf | 40.2050μs | 11.1368μs | 89.7926 KOps/s | 90.0243 KOps/s | |
test_stacked_getitem | 29.9450μs | 10.1705μs | 98.3237 KOps/s | 97.7798 KOps/s | |
test_lock_nested | 0.6617ms | 0.3328ms | 3.0049 KOps/s | 2.9234 KOps/s | |
test_lock_stack_nested | 0.4512ms | 0.2914ms | 3.4312 KOps/s | 3.2801 KOps/s | |
test_unlock_nested | 74.3478ms | 0.4093ms | 2.4434 KOps/s | 2.3781 KOps/s | |
test_unlock_stack_nested | 0.4641ms | 0.3000ms | 3.3329 KOps/s | 3.1907 KOps/s | |
test_flatten_speed | 0.5750ms | 0.2614ms | 3.8253 KOps/s | 3.8143 KOps/s | |
test_unflatten_speed | 0.5609ms | 0.4031ms | 2.4806 KOps/s | 2.4482 KOps/s | |
test_common_ops | 1.1649ms | 0.6832ms | 1.4637 KOps/s | 1.4920 KOps/s | |
test_creation | 17.8630μs | 1.8388μs | 543.8243 KOps/s | 490.3135 KOps/s | |
test_creation_empty | 65.2410μs | 10.4834μs | 95.3891 KOps/s | 104.4171 KOps/s | |
test_creation_nested_1 | 39.3630μs | 13.1380μs | 76.1154 KOps/s | 82.0386 KOps/s | |
test_creation_nested_2 | 41.4670μs | 16.4426μs | 60.8178 KOps/s | 63.5368 KOps/s | |
test_clone | 46.8670μs | 13.0042μs | 76.8985 KOps/s | 77.2227 KOps/s | |
test_getitem[int] | 36.1570μs | 11.0381μs | 90.5950 KOps/s | 91.3841 KOps/s | |
test_getitem[slice_int] | 57.4870μs | 21.7345μs | 46.0098 KOps/s | 44.6994 KOps/s | |
test_getitem[range] | 0.1047ms | 38.8515μs | 25.7390 KOps/s | 24.0381 KOps/s | |
test_getitem[tuple] | 44.2210μs | 17.8961μs | 55.8780 KOps/s | 55.2337 KOps/s | |
test_getitem[list] | 0.1400ms | 34.8863μs | 28.6645 KOps/s | 27.9011 KOps/s | |
test_setitem_dim[int] | 73.5360μs | 33.9223μs | 29.4792 KOps/s | 31.0078 KOps/s | |
test_setitem_dim[slice_int] | 91.7700μs | 58.3018μs | 17.1521 KOps/s | 17.2476 KOps/s | |
test_setitem_dim[range] | 0.1252ms | 75.9220μs | 13.1714 KOps/s | 13.1061 KOps/s | |
test_setitem_dim[tuple] | 64.4890μs | 46.5564μs | 21.4793 KOps/s | 21.3835 KOps/s | |
test_setitem | 55.4430μs | 19.1141μs | 52.3175 KOps/s | 52.1278 KOps/s | |
test_set | 56.2540μs | 18.6902μs | 53.5040 KOps/s | 55.1808 KOps/s | |
test_set_shared | 4.2872ms | 0.1374ms | 7.2758 KOps/s | 7.1922 KOps/s | |
test_update | 90.4380μs | 20.8360μs | 47.9939 KOps/s | 51.4266 KOps/s | |
test_update_nested | 0.2248ms | 29.3368μs | 34.0869 KOps/s | 37.4797 KOps/s | |
test_update__nested | 80.0780μs | 24.3801μs | 41.0170 KOps/s | 42.8913 KOps/s | |
test_set_nested | 67.0240μs | 20.9050μs | 47.8354 KOps/s | 50.2067 KOps/s | |
test_set_nested_new | 0.3326ms | 24.7379μs | 40.4238 KOps/s | 42.1128 KOps/s | |
test_select | 0.1250ms | 38.6067μs | 25.9022 KOps/s | 25.9929 KOps/s | |
test_select_nested | 0.1295ms | 59.0960μs | 16.9216 KOps/s | 16.8867 KOps/s | |
test_exclude_nested | 0.4489ms | 0.1191ms | 8.3979 KOps/s | 8.5259 KOps/s | |
test_empty[True] | 0.5788ms | 0.4001ms | 2.4992 KOps/s | 2.4954 KOps/s | |
test_empty[False] | 6.6770μs | 1.0347μs | 966.5031 KOps/s | 970.1227 KOps/s | |
test_unbind_speed | 0.3270ms | 0.2439ms | 4.1003 KOps/s | 4.0409 KOps/s | |
test_unbind_speed_stack0 | 0.4578ms | 0.2395ms | 4.1749 KOps/s | 4.1520 KOps/s | |
test_unbind_speed_stack1 | 0.1196s | 0.6653ms | 1.5031 KOps/s | 1.4630 KOps/s | |
test_split | 0.1120s | 1.6115ms | 620.5582 Ops/s | 617.3088 Ops/s | |
test_chunk | 2.2226ms | 1.4402ms | 694.3720 Ops/s | 685.9043 Ops/s | |
test_creation[device0] | 0.1712ms | 0.1009ms | 9.9093 KOps/s | 9.9634 KOps/s | |
test_creation_from_tensor | 4.0754ms | 82.2606μs | 12.1565 KOps/s | 12.3195 KOps/s | |
test_add_one[memmap_tensor0] | 0.1733ms | 5.4877μs | 182.2260 KOps/s | 184.9358 KOps/s | |
test_contiguous[memmap_tensor0] | 13.5650μs | 0.6464μs | 1.5470 MOps/s | 1.5642 MOps/s | |
test_stack[memmap_tensor0] | 26.8100μs | 3.6463μs | 274.2495 KOps/s | 280.4126 KOps/s | |
test_memmaptd_index | 1.1659ms | 0.2363ms | 4.2325 KOps/s | 4.2062 KOps/s | |
test_memmaptd_index_astensor | 0.6821ms | 0.2983ms | 3.3518 KOps/s | 3.3565 KOps/s | |
test_memmaptd_index_op | 0.8310ms | 0.5983ms | 1.6714 KOps/s | 1.7286 KOps/s | |
test_serialize_model | 0.2114s | 0.1123s | 8.9072 Ops/s | 8.5467 Ops/s | |
test_serialize_model_pickle | 0.4476s | 0.3791s | 2.6381 Ops/s | 2.6138 Ops/s | |
test_serialize_weights | 0.1039s | 98.8332ms | 10.1181 Ops/s | 10.1868 Ops/s | |
test_serialize_weights_returnearly | 0.2421s | 0.1378s | 7.2589 Ops/s | 7.1495 Ops/s | |
test_serialize_weights_pickle | 0.8689s | 0.5422s | 1.8443 Ops/s | 2.3400 Ops/s | |
test_serialize_weights_filesystem | 93.7459ms | 89.5678ms | 11.1647 Ops/s | 10.4247 Ops/s | |
test_serialize_model_filesystem | 0.1009s | 92.9334ms | 10.7604 Ops/s | 10.7895 Ops/s | |
test_reshape_pytree | 43.6810μs | 21.0188μs | 47.5765 KOps/s | 48.7550 KOps/s | |
test_reshape_td | 71.6830μs | 31.1971μs | 32.0543 KOps/s | 32.4233 KOps/s | |
test_view_pytree | 48.1190μs | 20.7089μs | 48.2885 KOps/s | 48.9300 KOps/s | |
test_view_td | 0.1255s | 61.4739μs | 16.2671 KOps/s | 17.6019 KOps/s | |
test_unbind_pytree | 69.5290μs | 24.8653μs | 40.2166 KOps/s | 41.7629 KOps/s | |
test_unbind_td | 0.1239ms | 36.3882μs | 27.4814 KOps/s | 27.8270 KOps/s | |
test_split_pytree | 81.0800μs | 24.2542μs | 41.2300 KOps/s | 42.4077 KOps/s | |
test_split_td | 0.1139ms | 38.7998μs | 25.7734 KOps/s | 24.9618 KOps/s | |
test_add_pytree | 66.0420μs | 30.2709μs | 33.0350 KOps/s | 33.6526 KOps/s | |
test_add_td | 0.1573ms | 52.4012μs | 19.0835 KOps/s | 19.6135 KOps/s | |
test_distributed | 0.1878ms | 99.2530μs | 10.0753 KOps/s | 10.0515 KOps/s | |
test_tdmodule | 0.1098ms | 17.7281μs | 56.4077 KOps/s | 59.8769 KOps/s | |
test_tdmodule_dispatch | 60.8030μs | 34.7565μs | 28.7716 KOps/s | 30.2259 KOps/s | |
test_tdseq | 45.3540μs | 19.9239μs | 50.1911 KOps/s | 51.5452 KOps/s | |
test_tdseq_dispatch | 73.9480μs | 38.7822μs | 25.7850 KOps/s | 26.6907 KOps/s | |
test_instantiation_functorch | 1.5548ms | 1.2747ms | 784.5110 Ops/s | 772.6155 Ops/s | |
test_instantiation_td | 1.5317ms | 0.9852ms | 1.0151 KOps/s | 1.0044 KOps/s | |
test_exec_functorch | 0.3244ms | 0.1578ms | 6.3366 KOps/s | 6.3345 KOps/s | |
test_exec_functional_call | 0.2828ms | 0.1461ms | 6.8464 KOps/s | 6.7187 KOps/s | |
test_exec_td | 0.3438ms | 0.1402ms | 7.1310 KOps/s | 7.0004 KOps/s | |
test_exec_td_decorator | 0.3751ms | 0.1923ms | 5.2014 KOps/s | 5.0933 KOps/s | |
test_vmap_mlp_speed[True-True] | 0.6712ms | 0.4696ms | 2.1295 KOps/s | 2.1450 KOps/s | |
test_vmap_mlp_speed[True-False] | 0.7051ms | 0.4672ms | 2.1404 KOps/s | 2.1670 KOps/s | |
test_vmap_mlp_speed[False-True] | 0.4945ms | 0.3799ms | 2.6324 KOps/s | 2.6346 KOps/s | |
test_vmap_mlp_speed[False-False] | 0.6470ms | 0.3828ms | 2.6121 KOps/s | 2.6566 KOps/s | |
test_vmap_mlp_speed_decorator[True-True] | 1.1162ms | 0.4877ms | 2.0503 KOps/s | 2.0661 KOps/s | |
test_vmap_mlp_speed_decorator[True-False] | 0.6713ms | 0.4865ms | 2.0556 KOps/s | 2.0863 KOps/s | |
test_vmap_mlp_speed_decorator[False-True] | 0.7885ms | 0.3981ms | 2.5122 KOps/s | 2.5331 KOps/s | |
test_vmap_mlp_speed_decorator[False-False] | 0.5555ms | 0.3969ms | 2.5196 KOps/s | 2.5428 KOps/s | |
test_to_module_speed[True] | 1.8516ms | 1.3766ms | 726.4525 Ops/s | 720.8859 Ops/s | |
test_to_module_speed[False] | 1.5328ms | 1.3664ms | 731.8351 Ops/s | 735.7217 Ops/s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cc @Cadene: I made more explicit the doc RE dict compatibility in the readme. I will update the doc separately. Feedback is welcome!
cc @Miffyli I also made a
save
,dump
andload
function to make sure people are not-so-scared about memory-mapped tensors :p