更快的替代memcpy的? [英] faster alternative to memcpy?
本文介绍了更快的替代memcpy的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个做的memcpy功能,但它占用周期的大量。是否有一个更快的替代方案/方法比使用的memcpy移动一块内存?
I have a function that is doing memcpy, but it's taking up an enormous amount of cycles. Is there a faster alternative/approach than using memcpy to move a piece of memory?
推荐答案
的memcpy
很可能是你可以在内存中复制字节的最快方法。如果你需要的东西更快 - 尝试搞清楚的不的复制周围的事物,例如一种方式交换指针只,而不是数据本身。
memcpy
is likely to be the fastest way you can copy bytes around in memory. If you need something faster - try figuring out a way of not copying things around, e.g. swap pointers only, not the data itself.
这篇关于更快的替代memcpy的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文