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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:39:36+00:00 2026-05-28T07:39:36+00:00

anyone tried BEPU Physic Engine ? http://bepuphysics.codeplex.com/ It’s a fully managed physic engine written

  • 0

anyone tried BEPU Physic Engine ?
http://bepuphysics.codeplex.com/

It’s a fully managed physic engine written in C# … I know it mostly used for XNA ( XBOX and WP7 Projects ) Because Unmanaged Codes are not Allowed.

But what I want to know is how a fully Managed Physic Engine is compared to a P/Invoked One ( For example tao.ODE ) in Windows Environment ( in term of performance ) ?

In other words which method makes more overhead, fully managed code or P/Invoke Wrapper around unmanaged Engines like ODE or PhysX in a Real Project?

  • 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-28T07:39:37+00:00Added an answer on May 28, 2026 at 7:39 am

    I cannot comment on the specific physics engines, however I can offer some experience in writing high performance code (both unmanaged and managed).

    A few years ago I worked on a piece of simulation software written in Delphi and ported to .NET (before my arrival I might say). It was pure managed code and computed ion-trajectories for mass spectrometer simulations. The code involved numerical integration, differentiation, N-body electrostatic charge calculations so was certainly testing the CPU.

    I found through various experiments trying to find the highest performance that some C++ versions of the simulation routines could be beaten by well optimized C# code.

    By well optimized I mean reduction of new operators (re-use of objects), caching, object pooling, use of structs where possible, minimizing method calls where possible, moving method calls to static / sealed where possible, minimize number of parameters passed to methods, compile in release, x64, detached from debugger. Once I had done this, to actually beat the CLR using C++ I had to resort to low level techniques such as SSE/SSE2 and inline assembler.

    Ok, I’ll admit, C# and managed languages are no match for hand-optimized C++ code in experienced hands, but I’ve seen poorly optimized code on both platforms. It’s easy to blame the CLR when C# code is slow but when developers are using the new operator at will I find it odd they get surprised when the GC is run so frequently. new and delete in C++ also imposes a performance hit so don’t expect C++ compilation to just make things faster.

    Back to your specific engine – you will have to of course do some testing and performance analysis yourself. Regarding platform invoke, it does incur a performance hit known as thunking when pointers and structs are marshalled across the managed/unmanaged boundary. Pure managed code will not have this but also it will miss out on optimisations such as low level memory copy, SSE/SSE2 extensions etc… that can be coded in C++.

    Finally I will say that for an example of managed->Platform invoke library that is extremely powerful and fast, take a look at SlimDX. Ok you’re going to get a performance hit over native code and DirectX (some sources say ~5%) but for the productivity benefits of developing in C# I’d say its worth it!

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

Sidebar

Related Questions

Has anyone tried to build this project: http://sites.google.com/site/webrtc/reference I can not seem to build
Has anyone tried coding in managed C++? I have a few questions : How
Has anyone tried using ASP.NET MVC's WebForms view engine to do code generaiton? I
Has anyone tried before using subdomain-fu to change domain.com/user/1 to domain.com/UserName ? Are there
Has anyone tried using ZPT in Google App Engine? If yes, please let me
I found this tutorial on how to run Android OS here: http://www.javacodegeeks.com/2010/06/install-android-os-on-pc-with.html Has anyone
I I'm trying to login to live.com via cURL Has anyone tried that before?
Has anyone tried installing SQL Server 2008 Developer on a machine that already has
Has anyone tried the ActiveRecord Intro Sample with C# 3.5? I somehow have the
Has anyone tried to dynamically select which properties they want to write to an

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.