A performance comparison of two thread synchronization approaches

Photo by John Anvik on Unsplash

Lock-based Synchronization


Sorting algorithms 04

Image source: washingtonian.com


Sorting algorithm 03

Image by author


Sorting algorithm 2

Image by author
  • Divide the array into two subarrays: sorted and unsorted subarray (similar to that of selection sort)
  • In each iteration, remove the first element from the unsorted subarray and insert it in the proper position (depending on whether to be sorted in ascending or descending order) in the sorted subarray.
  • Iterate until the last element of the unsorted array is removed


Sorting algorithm 01

Image by author
  • Divide the array into two subarrays: sorted and unsorted subarrays
  • In each iteration, find the maximum/minimum element in the unsorted subarray and swap it with the first element of the unsorted subarray. After swapping, the first element of the unsorted subarray will be appended to the sorted subarray. Swapping the minimum value will sort the elements in ascending order while swapping the maximum value will sort the elements in descending order.
  • Continue…


A divide and conquer approach for multiplication

Photo by Antoine Dautry on Unsplash


A detailed list of frequently used Linux commands

Photo by Jesus Kiteque on Unsplash

1. FILE HANDLING

touch file_name
nano file_name


A detailed illustration of different types of cache misses

Photo by Scott Graham on Unsplash


Performance Engineering Series 3

Photo by Ehud Neuhaus on Unsplash

Optimization Rules related to Loops

1. Hoisting

#include <math.h>

void scale(double *x, double *y, int n){
for(int i=0; i< n; i++){
y[i] = x[i] * exp(sqrt(M_PI/2));
}
}


Performance Engineering Series 02

Photo by David Rangel on Unsplash

Optimizations Rules related to Logics

1. Constant Folding and Propagation

Gunavaran Brihadiswaran

A Computer Science Research Student who loves to do Research, Write and Travel

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store