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

  • Home
  • SEARCH
  • 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 3305628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:11:31+00:00 2026-05-17T21:11:31+00:00

I have a particle system with X particles. Each particle tests for collision with

  • 0

I have a particle system with X particles.
Each particle tests for collision with other particles. This gives X*X = X^2 collision tests per frame. For 60f/s, this corresponds to 60*X^2 collision detection per second.

What is the best technological approach for these intensive calculations? Should I use F#, C, C++ or C#, or something else?

The following are constraints

  1. The code is written in C# with the latest XNA
  2. Multi-threaded may be considered
  3. No special algorithm that tests the collision with the nearest neighbors or that reduces the problem

The last constraint may be strange, so let me explain.
Regardless constraint 3, given a problem with enormous computational requirement what would be the best approach to solve the problem.
An algorithm reduces the problem; still the same algorithm may behave different depending on technology. Consider pros and cons of CLR vs native C.

  • 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-05-17T21:11:31+00:00Added an answer on May 17, 2026 at 9:11 pm

    The simple answer is “measure it”. But take a look at this graph (that I borrowed from this question – which is worth your reading).

    Graph

    C++ is maybe 10% faster than MS’s C# implementation (for this particular calculation) and faster still against Mono’s C# implementation. But in real world terms, C++ is not all that much faster than C#.

    If you’re doing hard-core number crunching, you will want to use the SIMD/SSE unit of your CPU. This is something that C# does not normally support – but Mono is adding support for through Mono.Simd. You can see from the graph that using the SIMD unit gives a significant performance boost to both languages.

    (It’s worth noting that while C++ is still “faster” than C#, the choice of language has only a small effect on performance, compared to the choice of what hardware to use. As was mentioned in the comments – your choice of algorithm will have by far the greatest effect.)

    And finally, as Jerry Coffin mentioned in his answer, that you could also do the processing on the GPU. I imagine that it would be even faster than SIMD (but as I said – measure it). Using the GPU has the added beneift of leaving the CPU free to do other tasks. The downside is that your end-users will need a reasonable GPU.

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

Sidebar

Related Questions

I have a particle system where the positions and various properties are stored in
If you have a script that creates a particle system and then delete the
I need to create a particle system and retain the created particles. I need
im developing a very simple particle system in AS3, i have the particle (a
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
Have you managed to get Aptana Studio debugging to work? I tried following this,
I'm making a particle system for my game, which basically is smoke coming out
I'm working on a particle system and point sprites would be nice to use.
I am attempting to build a particle system utilizing CUDA to do the heavy
I am attempting to write a simple particle system that leverages CUDA to do

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.