A free Windows-compatible Operating System - mirrored from GitHub
Go to file
Hermès Bélusca-Maïto f9ec8698fc [NTVDM]
- Use a helper function for copying little chunks of memory (1, 2, 4 and 8 bytes) because a profiling of ntvdm showed that especially 1 and 2 bytes of memory were read the most, and calling RtlCopy/MoveMemory for intensively copying 1 or 2 bytes was shown to be inefficient. We also don't use directly intrinsics/builtins because the compiler cannot know in advance the size of the memory to be copied, it cannot perform the required optimizations. It was checked that using the builtin-memcpy or memmove of GCC when compiling the program in release+full optimization mode just embedded a call to _memcpy, and naively using the movsX intrinsics of MSVC does not do the job of "moving" memory taking into account for the possible overlaps. Therefore, for small sizes (<= 8 bytes), we use copy assignments, whereas for large sizes (and for 3, 5, 7, 9+ bytes) we use the regular method of calling RtlMoveMemory. We gain ~=10% speed with this optimization.
- Also I use >> and & for dividing by 4 and 2 instead of the regular / and % operations because they are not optimized otherwise by default by MSVC (they are however, if you explicitely enable optimizations).

svn path=/trunk/; revision=64792
2014-10-17 22:08:51 +00:00
reactos [NTVDM] 2014-10-17 22:08:51 +00:00
rosapps [BUTTERFLIES] 2014-09-24 22:18:51 +00:00
rostests [User32Test] 2014-10-17 17:48:35 +00:00
wallpaper - Add CMakeLists for wallpaper 2012-02-05 13:43:04 +00:00