Title: getBytes 内部建议用 memcpy_s 实现 · Issue #3 · CPythoner/ByteBuffer · GitHub
Open Graph Title: getBytes 内部建议用 memcpy_s 实现 · Issue #3 · CPythoner/ByteBuffer
X Title: getBytes 内部建议用 memcpy_s 实现 · Issue #3 · CPythoner/ByteBuffer
Description: 性能大概有几百倍的差距 void getBytes(uint8_t* buf, uint32_t len) { if (0 == memcpy_s(buf, len, p_buffer_ + position_, remaining())) position_ = position_ + len; } void getBytes(uint32_t index, uint8_t* buf, uint32_t len) const { memcpy_s(buf, len, ...
Open Graph Description: 性能大概有几百倍的差距 void getBytes(uint8_t* buf, uint32_t len) { if (0 == memcpy_s(buf, len, p_buffer_ + position_, remaining())) position_ = position_ + len; } void getBytes(uint32_t index, uint8_t* buf, u...
X Description: 性能大概有几百倍的差距 void getBytes(uint8_t* buf, uint32_t len) { if (0 == memcpy_s(buf, len, p_buffer_ + position_, remaining())) position_ = position_ + len; } void getBytes(uint32_t index, uint8_t* buf, u...
Opengraph URL: https://github.com/CPythoner/ByteBuffer/issues/3
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"getBytes 内部建议用 memcpy_s 实现","articleBody":"性能大概有几百倍的差距\r\n```\r\n void getBytes(uint8_t* buf, uint32_t len)\r\n {\r\n if (0 == memcpy_s(buf, len, p_buffer_ + position_, remaining()))\r\n position_ = position_ + len;\r\n }\r\n void getBytes(uint32_t index, uint8_t* buf, uint32_t len) const\r\n {\r\n memcpy_s(buf, len, p_buffer_ + index, limit_ - index);\r\n }\r\n```","author":{"url":"https://github.com/abevol","@type":"Person","name":"abevol"},"datePublished":"2023-10-15T22:19:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3/ByteBuffer/issues/3"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:521ed62a-a58c-309f-8348-761bdc7aa86e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B998:349284:5FA7AD:8865E8:6A59E6FA |
| html-safe-nonce | 4b0ef51c372b3b9906f69a221bfad51a69ecbde7e204f935c9ead94238baa342 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTk4OjM0OTI4NDo1RkE3QUQ6ODg2NUU4OjZBNTlFNkZBIiwidmlzaXRvcl9pZCI6IjUzNTkzMDM4MDQ4MzEwMDAzMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 28e254b984c57ec257599339130e369dacdc4626a957e945ff331c5ae13768ca |
| hovercard-subject-tag | issue:1944079220 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/CPythoner/ByteBuffer/3/issue_layout |
| twitter:image | https://opengraph.githubassets.com/353f862f3ee9a6ce5e308057f3e2a63add1cf0cc6bdccc6aadcd95126b2b01d6/CPythoner/ByteBuffer/issues/3 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/353f862f3ee9a6ce5e308057f3e2a63add1cf0cc6bdccc6aadcd95126b2b01d6/CPythoner/ByteBuffer/issues/3 |
| og:image:alt | 性能大概有几百倍的差距 void getBytes(uint8_t* buf, uint32_t len) { if (0 == memcpy_s(buf, len, p_buffer_ + position_, remaining())) position_ = position_ + len; } void getBytes(uint32_t index, uint8_t* buf, u... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abevol |
| hostname | github.com |
| expected-hostname | github.com |
| None | ba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353 |
| turbo-cache-control | no-preview |
| go-import | github.com/CPythoner/ByteBuffer git https://github.com/CPythoner/ByteBuffer.git |
| octolytics-dimension-user_id | 6645605 |
| octolytics-dimension-user_login | CPythoner |
| octolytics-dimension-repository_id | 351674544 |
| octolytics-dimension-repository_nwo | CPythoner/ByteBuffer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 351674544 |
| octolytics-dimension-repository_network_root_nwo | CPythoner/ByteBuffer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 32bf0b7849e1b6561059cca2cb03568251960859 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width