⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 @psc_readme_49798_1.txt

📁 Use Asm in Visual Basic With Class Vtables demotrate with ASM Copy Memory Function
💻 TXT
字号:
Title: Copy memory FAST using MMX/SSE. Updated
Description: I was wondering whether MMX/SSE instructions could be employed to improve on the performance of CopyMemory for large blocks of data. Well, as you can from the screenshot, in some scenarios huge benefits can be wrought. Though I have to state, overall, the best strategy is to play nice with the cache and ensure that both source and destination are aligned on 16 byte boundaries. Nota Bene: The ASM routines DO NOT work with overlapped source and destination, though why a VB programmer would be doing that, I can't imagine. Don't concern yourself that that a user's CPU might be ancient and not support either MMX or SSE instructions, if those capabilities aren't found, then the cMemory class seamlessly falls back to using the regular api functions. For actual usage, use the cMemory.cls which chooses SSE over MMX, if available, automatically, rather than the cMemTest.cls, as used in the sample project, which was written just so that I could demonstrate both MMX and SSE codes against each other. Just for fun, I also test the equivalent C run-time functions memcpy, memmove & memset. The screenshot was produced on a P4 @ 1.8GHzSee comments below for update details...
This file came from Planet-Source-Code.com...the home millions of lines of source code
You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=49798&lngWId=1

The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -