This Week I Learnt - May 3th - May 9th

1 minute read

Second post in This Week I Learnt (or Worked on) series.

Open-Source

Worked a bit on cleaning up some obvious inefficiencies in the AirSim-ArduPilot interface. 2 PRs currently in this, first is PR #3656: ArduPilot: Reduce data copying, stack memory usage, the PR description explains the improvements. The other is PR #3658: Return sensor data as const references rather than by value, this avoids extra unnecessary copies being made on reading the sensor data. Both of these are definitely not a performance bottleneck, but just simple easy fixes so why not.

Continuation of last week’s post, the ArduPilot airsim-non-gps branch has more commits on top to automatically switch between GPS and local NED position depending on the fields in the JSON packet. Looking at the parsing code now, I think it can be improved, especially the float array and vector3f array parsing, sscanf can be accidentally O(n^2) in runtime. This again is not a serious performance bottleneck, but if it can be improved, best to do it. Plus the code will likely be cleaner than the original.

Academics

Worked on a report for the Bottom-up Context-Sensitive Pointer Analysis for Java paper. Now trying to think about how it can be extended for parallel programs and integrating the MHP analysis.

Completed implementing the MHP Analysis for this assignment, using the algorithm described in An Efficient Algorithm for Computing MHP Information for Concurrent Java Programs. Naumovich-Avrunin-Clarke. FSE 1999.

For a Secure Systems Engineering course, started working on a project implementing some of the concepts described in Houdini’s Escape: Breaking the Resource Rein of Linux Control Groups. I’m thinking of writing a few short blogs on this, should be interesting.

Others

Read some articles on C++ and breaking ABI and its implications, an interesting one was Jason Turner’s C++ Weekly - Ep 270 - Break ABI to Save C++. I don’t have a very fixed opinion on this matter as such currently, but very interesting.

Digging into some performance improvements lead to reading a chapter in Optimized C++, quite an informative one. Will try to adopt a similar approach for implementing the sscanf parsing improvement mentioned earlier and see the results.

Updated: