question

Hao Zhou avatar image
1 Like"
Hao Zhou asked Hao Zhou commented

Speed Benchmark for FlexSim 2016 and FlexSim 2017

I attached two models for FlexSim engine speed benchmark. computer-benchmark-161.fsmcomputer-benchmark-171.fsm

The first one can run properly in 16.1 and 17.1 beta with OpenGL Context "Legacy".

The second one can run properly in 17.1 beta with OpenGL Context "Modern" (Core Profile).

The model simply generates 1000000 boxes and we can compare how long it takes to generate these boxes and how fast is the frame rate, etc. To run the model, just click "Reset" and click "Run" in the script window. It will show the total generation time in the output window.

The result is as follows:

1. Using FlexSim 16.1 to run the first model, it takes around 41 seconds to generate 1000000 boxes. Frame rate is around 12 with soft shadows cascade splits 3.

2, Using FlexSim 17.1 beta to run the first model, it takes around 9 seconds to generate 1000000 boxes. Frame rate is around 12 with soft shadows cascade splits 3 (OpenGL Context "Legacy").

3. Using FlexSim 17.1 beta to open the second model, it takes around 15 seconds to generate 1000000 boxes. Frame rate is around 9 with soft shadows cascade splits 3 (OpenGL Context "Modern").

My questions are as follows:

1. By running the exact same model, why engine 17.1 only takes 25% of engine 16.1's time? Is this because of new FlexScript or OpenGL update?

2. By running different models one the same engine, because we need to convert GL_QUADS to GL_TRIANGLES, we have 50% more addVertex() function calls. That it why it takes longer time to generate. But it also shows OpenGL Context "Modern" mode with GL_TRIANGLES drawing is slower than "Legacy" mode with GL_QUADS drawing. What it the benefit of OpenGL core profile mode?

Thanks, Hao

FlexSim 17.0.3
flexscriptopengl
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Phil BoBo avatar image
3 Likes"
Phil BoBo answered Hao Zhou commented

1. This is because of the FlexScript update to compile to machine code rather than being interpreted at runtime.

2. Not all graphics drivers support all the features of OpenGL. Some graphics driver implementations and system configurations (such as VMware virtual machines) only perform hardware graphics acceleration with a modern OpenGL Core Profile.

Oftentimes, the OpenGL updates make certain simple cases (such as drawing a bunch of boxes) perform slower, but they make more complicated cases (such as rendering shadows or instanced rendering of many repeated shapes) easier and faster.

The OpenGL Core Profile isn't about speed. It is about compatibility with graphics drivers. The deprecation of GL_QUADS is also not about speed; it is about compatibility. These tests will have different results on different graphics cards and drivers.

Nvidia is really good about preserving backwards compatibility and supporting even the most obscure OpenGL features (such as GL_SELECT). Nvidia drivers are also very forgiving and fast when you try to do unexpected things. Other graphics cards are not so flexibile.


core-profile.png (134.3 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Hao Zhou avatar image Hao Zhou commented ·

It is very impressive about the speed of the upgraded FlexScript. Thanks for the information about OpenGL core profile. These are really helpful.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.