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 8246909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:39:50+00:00 2026-06-07T22:39:50+00:00

As part of a new variant on an algorithm I am using (leaning toward

  • 0

As part of a new variant on an algorithm I am using (leaning toward SMP use), I am considering sorting my particles into boxes, by having each box have a particle* []. My only concern is that since the number of particles per box can vary, (average 10 has been known to go as high as 70 in very rare cases), I would need to massively overallocate the pointer arrays. I was thinking probably on the order of 5-10% utilization.

Extreme cases would have on the order of a million of these, so we’re considering half a GB of allocated memory. It’s not a problem in terms of the machines it will run on, but I’m wondering if there’s a performance penalty (caches hate it or something) associated with striding memory that much. (Accessing the first 60 or so bytes out of 500, for example).
I do know to make sure my stride width doesn’t end up being a cache-destroying multiple of 64 though…

I am OK with having it fail in VERY rare cases, as long as this plan buys me enough performance gain to be able to run more successful copies in the same amount of time.

If it’s relevant, this code will mostly be run on Xeon E5620’s, though that will change and I’d rather not do anything architecture-specific.

EDIT: This is comparing N bytes of packed data in contiguous memory to N bytes of data evenly strided over a much larger area of contiguous memory.

  • 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-07T22:39:52+00:00Added an answer on June 7, 2026 at 10:39 pm

    If the memory you allocate does not cause swapping, simply having it allocated does not cause any extra overhead.

    However, if your algorithm currently packs data points into contiguous memory and your new algorithm spreads that 5%-10% utilization over the entire allocated buffer (unclear from your question if that is the case), you would have quite a few more cache misses accessing memory.

    If on the other hand you have one buffer per CPU (and you use contiguous memory), your algorithm may perform better due to reduced opportunity for false sharing.

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

Sidebar

Related Questions

We are new to Scrum and part way through the first sprint we have
I am new to the Administration part of the Oracle server,Just want to know
Part of my code goes like this: while(1){ my $winmm = new Win32::MediaPlayer; $winmm->load('1.mp3');
I am new to ASP MVC and as part of learning i was developing
Im new to joomla so excuse the possible confused-ness in my part im developing
Hi I am new to Python and as a part of my assignment I
I'm new to web developing. This is part of a phone service, and I'm
Part of my n00b server: TcpClient client = tcpListener.AcceptTcpClient(); Thread clientThread = new Thread(new
Hello I am new to Git and trying to setup server part and client
I am inserting part of a large table to a new MyISAM table. I

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.