C++

PS4

Optimisation

Low-Level Programming Challenge

Low-Level Programming Challenge

Low-Level Programming Challenge

Low-Level Programming Challenge

Low-Level Programming Challenge

Low-Level Programming Challenge

One of my final year's assignements involved working with the application displayed below which simulates physics and collisions for tens of thousands of boxes, and to use optimisation techniques to take its performance from the choppy state was in to a smoother simulation.

One of my final year's assignements involved working with the application displayed below which simulates physics and collisions for tens of thousands of boxes, and to use optimisation techniques to take its performance from the choppy state was in to a smoother simulation.

One of my final year's assignements involved working with the application displayed below which simulates physics and collisions for tens of thousands of boxes, and to use optimisation techniques to take its performance from the choppy state was in to a smoother simulation.

One of my final year's assignements involved working with the application displayed below which simulates physics and collisions for tens of thousands of boxes, and to use optimisation techniques to take its performance from the choppy state was in to a smoother simulation.

One of my final year's assignements involved working with the application displayed below which simulates physics and collisions for tens of thousands of boxes, and to use optimisation techniques to take its performance from the choppy state was in to a smoother simulation.

One of my final year's assignements involved working with the application displayed below which simulates physics and collisions for tens of thousands of boxes, and to use optimisation techniques to take its performance from the choppy state was in to a smoother simulation.

To begin with, I set up a memory management and tracking system by overloading the c++ 'new' and 'delete' operators in the application which allowed me to track all memory allocated on the heap, identify which classes occupy it, and to 'walk the heap' which is way of checking memory integrity during runtime. Further, I implemented a simple memory pool class that I used to contain the boxes' data in order to try and minimise memory fragmentation.

I then used the Parallel Patterns Library(PPL) to implement multithreading and parallelise physics calculations within the application, providing multiple-fold improvements in performance.

To begin with, I set up a memory management and tracking system by overloading the c++ 'new' and 'delete' operators in the application which allowed me to track all memory allocated on the heap, identify which classes occupy it, and to 'walk the heap' which is way of checking memory integrity during runtime. Further, I implemented a simple memory pool class that I used to contain the boxes' data in order to try and minimise memory fragmentation.

I then used the Parallel Patterns Library(PPL) to implement multithreading and parallelise physics calculations within the application, providing multiple-fold improvements in performance.

To begin with, I set up a memory management and tracking system by overloading the c++ 'new' and 'delete' operators in the application which allowed me to track all memory allocated on the heap, identify which classes occupy it, and to 'walk the heap' which is way of checking memory integrity during runtime. Further, I implemented a simple memory pool class that I used to contain the boxes' data in order to try and minimise memory fragmentation.

I then used the Parallel Patterns Library(PPL) to implement multithreading and parallelise physics calculations within the application, providing multiple-fold improvements in performance.

To begin with, I set up a memory management and tracking system by overloading the c++ 'new' and 'delete' operators in the application which allowed me to track all memory allocated on the heap, identify which classes occupy it, and to 'walk the heap' which is way of checking memory integrity during runtime. Further, I implemented a simple memory pool class that I used to contain the boxes' data in order to try and minimise memory fragmentation.

I then used the Parallel Patterns Library(PPL) to implement multithreading and parallelise physics calculations within the application, providing multiple-fold improvements in performance.

To begin with, I set up a memory management and tracking system by overloading the c++ 'new' and 'delete' operators in the application which allowed me to track all memory allocated on the heap, identify which classes occupy it, and to 'walk the heap' which is way of checking memory integrity during runtime. Further, I implemented a simple memory pool class that I used to contain the boxes' data in order to try and minimise memory fragmentation.

I then used the Parallel Patterns Library(PPL) to implement multithreading and parallelise physics calculations within the application, providing multiple-fold improvements in performance.

To begin with, I set up a memory management and tracking system by overloading the c++ 'new' and 'delete' operators in the application which allowed me to track all memory allocated on the heap, identify which classes occupy it, and to 'walk the heap' which is way of checking memory integrity during runtime. Further, I implemented a simple memory pool class that I used to contain the boxes' data in order to try and minimise memory fragmentation.

I then used the Parallel Patterns Library(PPL) to implement multithreading and parallelise physics calculations within the application, providing multiple-fold improvements in performance.

To cut down on the number of collision calculations, I looked at implementing a quadtree(see image below) which is a technique wherein all of the objects within an area are repeatedly classified into one of four quadrants based on their position until there are only one or two boxes left per quadrant, and the boxes are then only checked for collision with boxes that are in their quadrant.

To cut down on the number of collision calculations, I looked at implementing a quadtree(see image below) which is a technique wherein all of the objects within an area are repeatedly classified into one of four quadrants based on their position until there are only one or two boxes left per quadrant, and the boxes are then only checked for collision with boxes that are in their quadrant.

To cut down on the number of collision calculations, I looked at implementing a quadtree(see image below) which is a technique wherein all of the objects within an area are repeatedly classified into one of four quadrants based on their position until there are only one or two boxes left per quadrant, and the boxes are then only checked for collision with boxes that are in their quadrant.

To cut down on the number of collision calculations, I looked at implementing a quadtree(see image below) which is a technique wherein all of the objects within an area are repeatedly classified into one of four quadrants based on their position until there are only one or two boxes left per quadrant, and the boxes are then only checked for collision with boxes that are in their quadrant.

To cut down on the number of collision calculations, I looked at implementing a quadtree(see image below) which is a technique wherein all of the objects within an area are repeatedly classified into one of four quadrants based on their position until there are only one or two boxes left per quadrant, and the boxes are then only checked for collision with boxes that are in their quadrant.

To cut down on the number of collision calculations, I looked at implementing a quadtree(see image below) which is a technique wherein all of the objects within an area are repeatedly classified into one of four quadrants based on their position until there are only one or two boxes left per quadrant, and the boxes are then only checked for collision with boxes that are in their quadrant.

Finally, I also applied various code optimisations to the project, including the use of Single Instruction Multiple Data(SIMD) operations to speed up calculations.

In order to measure performance before and after optimisation, I used the debugging and profiling toolset provided on the Visual Studio platform, which was surprisingly useful in detecting problematic code as well!

The second part of the assignment involved porting the simulation to the PS4 platform, which was quite interesting to me as got to try out the PS4 SDK and its various APIs. In this implementation of the project, I used the PS4's User Level Threading(ULT) library instead and it prevented different challenges than the one I used on Windows such as having to balanced the load manually and achieving thread-safety manually instead of using thread-safe collections directly.

Overall, I was very happy with the results from both projects and got to learn a lot about optimising C++ code doing them.


Finally, I also applied various code optimisations to the project, including the use of Single Instruction Multiple Data(SIMD) operations to speed up calculations.

The second part of the assignment involved porting the simulation to the PS4 platform, which was quite interesting to me as got to try out the PS4 SDK and its various APIs. In this implementation of the project, I used the PS4's User Level Threading(ULT) library instead and it prevented different challenges than the one I used on Windows such as having to balanced the load manually and achieving thread-safety manually instead of using thread-safe collections directly.

In order to measure performance before and after optimisation, I used the debugging and profiling toolset provided on the Visual Studio platform as well as

Overall, I was very happy with the results from both projects and I got to learn a lot about optimising C++ code doing them.