I know MEMCPY

All development related issues welcome

Moderator: Moderator Team

Post Reply
LOst
Posts: 27
Joined: Sat Feb 12, 2005 9:33 pm

I know MEMCPY

Post by LOst »

I know that memcpy, memset, and the related functions in Windows are optimized to copy 16 bytes at a time.
Is ReactOS optimized this way, or is it slow as hell (copying/setting 1 byte at a time in the data loop)?

So many things are dependent on copying data as fast as possible.
GvG
Posts: 499
Joined: Mon Nov 22, 2004 10:50 pm
Location: The Netherlands

Post by GvG »

Our implementation of e.g. memset is in reactos/lib/string/i386/memset.s. We set 4 bytes at a time, DWORD-aligned.
LOst
Posts: 27
Joined: Sat Feb 12, 2005 9:33 pm

Post by LOst »

GvG wrote:Our implementation of e.g. memset is in reactos/lib/string/i386/memset.s. We set 4 bytes at a time, DWORD-aligned.
Cool.
So if I change this into 16 bytes (using floating point asm), will it work?
GvG
Posts: 499
Joined: Mon Nov 22, 2004 10:50 pm
Location: The Netherlands

Post by GvG »

Depends on whether you introduce bugs I guess :) I'd be interested if you see a measurable performance improvement.
LOst
Posts: 27
Joined: Sat Feb 12, 2005 9:33 pm

Post by LOst »

GvG wrote:Depends on whether you introduce bugs I guess :) I'd be interested if you see a measurable performance improvement.
This will be one of the first things I will test, as soon as I can compile ReactOS. I still haven't downloded GCC and all the stuff needed. I'm very interested in working with ReactOS in the future
blight
Developer
Posts: 35
Joined: Tue Nov 30, 2004 10:34 pm
Location: away

Post by blight »

...
Last edited by blight on Wed Feb 23, 2005 1:49 pm, edited 1 time in total.
LOst
Posts: 27
Joined: Sat Feb 12, 2005 9:33 pm

Post by LOst »

blight wrote:I doubt that this will improve overall speed - you would have to save and restore the MMX/SSE state before and after using such opcodes (KeSaveFloatingPointState/KeRestoreFloatingPointState - check MSDN: Using Floating Point or MMX in a WDM Driver for more information)
Okay, so these calls may slow down things. Well, it was worth asking at least.
Post Reply

Who is online

Users browsing this forum: Yandex [Bot] and 11 guests