This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ~/.vimrc | |
set mouse=a | |
set nu | |
set laststatus=2 | |
set statusline= | |
set statusline+=%= | |
set statusline+=\[%c] | |
set statusline+=\ %l/ | |
set statusline+=%L |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
g++ --std=c++17 -O3 doublebuffer.cpp -odoublebuffer | |
*/ | |
#include <chrono> | |
#include <ctype.h> | |
#include <fstream> | |
#include <string> | |
#include <thread> | |
const size_t buf_size = 50000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Code to perform L1, L2 cache locality experiments | |
https://kaushikghose.wordpress.com/2020/01/27/profiling-and-improving-cache-performance/ | |
*/ | |
#include <iostream> | |
#include <vector> | |
const size_t N = 1200; | |
class Matrix { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*/ | |
#include <iostream> | |
#include <vector> | |
const size_t N = 1000; | |
class Matrix { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
struct Feet { | |
double f; | |
Feet(double f) | |
: f(f) | |
{ | |
} | |
explicit constexpr operator double() const { return f; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include "units.h" | |
using namespace units::literals; | |
using namespace units; | |
typedef units::length::meter_t Meters; | |
typedef units::length::foot_t Feet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PySide2.QtCore import QObject, QUrl, Signal, Slot | |
from PySide2.QtWidgets import QApplication | |
from PySide2.QtWebChannel import QWebChannel | |
from PySide2.QtWebEngineWidgets import QWebEngineView | |
# We create this file as follows | |
# First create a .qrc file so we can include the ace editor code and the qqwebchannel.js in a form | |
# usable by the application. Delightfully QT doesn't allow wildcards or directories in the .qrc |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Compile with | |
* gcc -msse4.1 -ggdb -O3 -Wall -Wextra measure-dram.c -o measure-dram \ | |
* && objdump -dx measure-dram | egrep 'movntdqa' -A 2 -B 2 | |
*/ | |
#define _GNU_SOURCE // setaffinity | |
#include <emmintrin.h> | |
#include <fcntl.h> | |
#include <sched.h> |
NewerOlder