Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8510621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:45:19+00:00 2026-06-11T03:45:19+00:00

Common widsom is that rep movsb is much slower than rep movsd (or on

  • 0

Common widsom is that rep movsb is much slower than rep movsd (or on 64-bit, rep movsq) when performing identical operations. However, I’ve been testing on a few modern machines, and the run times are coming out identical (up to measurement noise) across a huge range of buffer sizes (10 bytes to 2 megs). So far I have just tested on 2 machines (32-bit Intel Atom D510 and 64-bit AMD FX 8120).

  • Are there any modern x86 (32- or 64-bit) machines where rep movsb is slower than rep movsd (or rep movsq)?

  • If not, what was the last machine where the difference was significant, and how significant was it?

I’m asking this question from a standpoint of wanting to avoid cargo-culting a bunch of tests to break memory up into unaligned head/tail and aligned middle for the sake of using rep movsd or rep movsq if there’s no actual benefit to doing this…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:45:21+00:00Added an answer on June 11, 2026 at 3:45 am

    Lots of benchmarks here: instlatx64.atw.hu

    For example (Intel Core 2 Duo E6700):

    REP MOVSB   BW in L1D:13.04 B/c  34829MiB/s
    REP MOVSW   BW in L1D:13.29 B/c  35493MiB/s
    REP MOVSD   BW in L1D:13.40 B/c  35783MiB/s
    

    Which shows that there is a difference, but it’s tiny.

    This one for SandyBridge is a little weird:

    REP MOVSB   BW in L1D:25.50 B/c  86986MiB/s
    REP MOVSW   BW in L1D:18.09 B/c  61721MiB/s
    REP MOVSD   BW in L1D:27.47 B/c  93693MiB/s
    

    Seems there is a big difference on some Atoms (seems to have disappeared with the D5xx, so you just missed it):

    REP MOVSB   BW in L1D: 0.53 B/c    990MiB/s
    REP MOVSW   BW in L1D: 1.93 B/c   3598MiB/s
    REP MOVSD   BW in L1D: 3.74 B/c   6960MiB/s
    

    I haven’t found such big difference on anything else that can be considered new.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Common scenario: I have a library that uses other libraries. For example, a math
A common problem is that for validation you need to run the same code
A common question that comes up from time to time in the world of
Common Lisp HyperSpec says that require and ****modules**** are deprecated. But I still see
Many common filesystems do not offer atomic operations, yet writing files in an atomic
A common problem that I have with web pages is floating div tags creeping
The Common Lisp HyperSpec says in the funcall entry that (funcall function arg1 arg2
Exceptions cause Node.js servers to crash. The common wisdom is that one needs to
A common annoyance in Matlab is that, if one forgets the semicolon, one might
A common pattern with templated classes is that template argument is typedef'ed inside the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.