Giter VIP home page Giter VIP logo

Comments (3)

lhmouse avatar lhmouse commented on June 14, 2024

rep movsb/stosb is fast ( with large and aligned memory ) because of the ERMSB optimization.

Yes; and for small blocks of memory it has a huge startup overhead.
Those functions have been designed to be small and inlineable. They are not presumed to be fast.

But repz cmpsb is not the case. It's not optimized.

That does not matter. It is there only because GCC requires it. At the moment we make no use of it at all.

RtlCompareMemory is slow because it uses repz cmpsb too. We can use memcmp in ntdll, which results in both less code and better performance.

memcmp() does not exist in NTDLL.DEF from mingw-w64 and would cause undefined references if it was called.

from mcfgthread.

CarterLi avatar CarterLi commented on June 14, 2024

We dont use cmpsb but we use memmove

https://github.com/lhmouse/mcfgthread/blob/ac3cf22f602a15796992d72e52c49e91eb0b38d0/src/dtor_queue.c

Add GCC use these functions internally, that's why GCC requires it.

https://gcc.godbolt.org/z/f889cYc6e

And

They are exported from the DLL for external use

memcmp() does not exist in NTDLL.DEF from mingw-w64 and would cause undefined references if it was called.

What about kernel*.dll? No

from mcfgthread.

lhmouse avatar lhmouse commented on June 14, 2024

The fact that 'we make no use of it' does not mean we make no use of all of them.

from mcfgthread.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.