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

Remove unnecessary copies into OArray #2777

Merged
merged 4 commits into from
Jul 7, 2021

Conversation

eddyashton
Copy link
Member

Noticed as part of #2775:

We pass incoming messages in some places as OArray&&, despite never using the abstraction it provides (a long-lived projection onto owned data). We can replace the ownership points with a plain std::vector<uint8_t>, and where we pass it we can pass (data, size) (these could be refs if we had a pattern of read-modification that needed it, but we don't). The advantage of this is that when we're reading directly from an existing buffer (eg - we had (data, size) already pointing somewhere on the ringbuffer), we don't create an unnecessary copy into an OArray.

@eddyashton eddyashton requested a review from a team July 7, 2021 17:29
@ghost
Copy link

ghost commented Jul 7, 2021

replace_oarray@28636 aka 20210707.45 vs main ewma over 20 builds from 28245 to 28630

Click to see table
build_id build_number tpcc_sgx_cft^ tpcc_sgx_cft_mem tpcc_sgx_bft^ tpcc_sgx_bft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem CHAMP put (/s)^ CHAMP get (/s)^
28245 20210702.1 6520.96 9.05749e+07 3009.55 2.0985e+08 23314.6 1.74367e+07 4243.24 1.48153e+07 2577.16 9.57242e+06 2396.45 1.27181e+07 1773.66 8.2617e+06 1.35262e+06 3.61837e+07
28264 20210702.7 6640.26 9.16235e+07 2580.25 2.62804e+08 22515 1.74367e+07 4027.41 1.4291e+07 2670.77 9.31027e+06 2578.96 1.19317e+07 1700.31 8.52384e+06 1.32935e+06 3.59298e+07
28277 20210702.11 6331.32 9.10992e+07 3075.95 2.10375e+08 22464.2 1.74367e+07 4014.73 1.4291e+07 2557.44 9.57242e+06 2330.92 9.31027e+06 1685.92 8.52384e+06 1.34242e+06 3.59298e+07
28335 20210705.4 6240.41 9.18856e+07 3212.15 1.77082e+08 21304.1 1.74367e+07 4138.19 1.45532e+07 2651.31 9.31027e+06 2500.95 9.31027e+06 1704.86 8.52384e+06 1.31299e+06 3.61837e+07
28357 20210705.9 6615.18 9.37206e+07 3194.46 1.74461e+08 21695.3 1.74367e+07 4388.84 1.50774e+07 2527.32 9.57242e+06 2528.34 9.04813e+06 1768.94 8.52384e+06 1.34023e+06 3.62478e+07
28394 20210705.20 6471.83 9.10992e+07 3130.35 2.19812e+08 22903.6 1.74367e+07 4338.81 1.48153e+07 2605.5 9.57242e+06 2413.73 9.31027e+06 1758.01 1.00967e+07 1.3349e+06 3.62478e+07
28411 20210706.2 6409.07 9.13613e+07 2661.01 2.30298e+08 22950.7 1.74367e+07 4014.15 1.48153e+07 2576.64 9.57242e+06 2500.53 9.57242e+06 1731.57 8.52384e+06 1.33542e+06 3.69009e+07
28415 20210706.3 6563.1 9.16235e+07 3100.87 2.01462e+08 20278.4 1.74367e+07 4378.9 1.48153e+07 2635.76 9.57242e+06 2606.05 9.31027e+06 1653.03 9.31027e+06 1.34675e+06 3.59298e+07
28419 20210706.5 6288.48 9.18856e+07 3177.41 1.89665e+08 21434.2 1.74367e+07 4034.29 1.45532e+07 2702.66 9.83456e+06 2588.58 9.31027e+06 1765.41 8.52384e+06 1.34977e+06 3.53713e+07
28438 20210706.11 6556.78 9.29342e+07 2935.07 2.13783e+08 20822.4 1.71746e+07 3980.81 1.40289e+07 2704.48 9.57242e+06 2562.33 9.31027e+06 1796.76 8.2617e+06 1.37727e+06 3.69675e+07
28448 20210706.14 6675.75 9.26721e+07 2586.77 2.30036e+08 21426.6 1.74367e+07 3967.46 1.4291e+07 2408.64 1.0621e+07 2418.3 9.04813e+06 1788.01 1.14074e+07 1.34657e+06 3.58669e+07
28452 20210706.16 6516.25 9.13613e+07 2777.89 2.1352e+08 23173.7 1.71746e+07 4310.04 1.48153e+07 2597.21 1.00967e+07 2478.06 9.31027e+06 1747.34 8.52384e+06 1.33577e+06 3.62478e+07
28471 20210706.22 6149.25 9.21478e+07 3118.18 1.93598e+08 23238.4 1.74367e+07 4257.87 1.50774e+07 2636.36 9.57242e+06 2358.75 9.31027e+06 1711.39 7.99955e+06 1.34005e+06 3.67025e+07
28486 20210706.26 6291.18 9.26721e+07 3111.21 2.06967e+08 21472.6 1.71746e+07 4037.78 1.48153e+07 2685.07 9.31027e+06 2371.61 9.31027e+06 1716.86 8.52384e+06 1.32952e+06 3.59298e+07
28493 20210707.2 6484.78 9.16235e+07 3054.72 1.99365e+08 23082.9 1.71746e+07 4048.02 1.4291e+07 2499.25 9.31027e+06 2572.06 9.57242e+06 1810.19 8.2617e+06 1.34119e+06 3.61837e+07
28497 20210707.3 6430.53 9.10992e+07 3141.91 1.96481e+08 23741 1.76989e+07 4026.07 1.45532e+07 2563.13 9.57242e+06 2613.74 9.31027e+06 1796.21 8.2617e+06 1.33264e+06 3.60563e+07
28516 20210707.9 6358.96 9.21478e+07 3164.9 1.65286e+08 22538.1 1.74367e+07 4462.85 1.45532e+07 2650.47 9.57242e+06 2390.54 9.04813e+06 1717.23 8.52384e+06 1.36871e+06 3.69009e+07
28581 20210707.29 6385.83 9.26721e+07 3134.68 2.00151e+08 20870.1 1.71746e+07 3893.31 1.37667e+07 2579.66 1.08831e+07 2495.02 9.31027e+06 1762.05 8.52384e+06 1.3284e+06 3.68345e+07
28610 20210707.38 6548.55 9.18856e+07 2657.29 2.83251e+08 21599.6 1.71746e+07 4209.45 1.50774e+07 2635.18 9.57242e+06 2536.17 9.04813e+06 1667.97 8.52384e+06 1.31005e+06 3.50685e+07
28630 20210707.44 6302.1 9.18856e+07 3192.05 1.72888e+08 23307.5 1.74367e+07 3972.24 1.45532e+07 2519.59 1.19317e+07 2431.4 9.83456e+06 1774.17 8.2617e+06 1.34914e+06 3.61837e+07

images

@achamayou achamayou merged commit d4c1509 into microsoft:main Jul 7, 2021
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