Skip to content

Instantly share code, notes, and snippets.

View ttsiodras's full-sized avatar
💭
while True: hack()

Thanassis Tsiodras ttsiodras

💭
while True: hack()
View GitHub Profile
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\renewcommand*{\namefont}{\fontsize{24}{26}\mdseries\upshape}
\usepackage{fancybox}
\usepackage{mdwlist}
\usepackage[scale=0.75]{geometry}
\usepackage[colorlinks=true,urlcolor=blue,linkcolor=blue]{hyperref}
\firstname{John}
\familyname{Doe}
#!/bin/bash
#
# Commenting on https://www.youtube.com/watch?v=Qiu0jlsp3ws
# Much faster than the original, using bash arrays, as Brock wanted to do this initially.
# Also avoids using hardcoded numbers (takes the number of students from the array length)
#
# $ time ./students_brock.sh
#
# real 0m0.170s
# user 0m0.170s
@ttsiodras
ttsiodras / alioth.md
Last active September 29, 2021 12:44
History building alioth LineageOS

Commands I issued:

cd android/lineage/
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1
repo sync
source build/envsetup.sh
breakfast alioth
# intermission, to extract firmware files from latest LineageOS image into ~/android/system_dump/
find . -name extract-files.sh

cd device/xiaomi/alioth/

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <sched.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <x86intrin.h>
#define LEN 1000000
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <sched.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <x86intrin.h>
#define LEN 1000000
.intel_syntax noprefix
l1:
vmulpd ymm2,ymm0,ymm1
vmulpd ymm0,ymm0,ymm0
vmulpd ymm1,ymm1,ymm1
vaddpd ymm4,ymm0,ymm1
vsubpd ymm0,ymm0,ymm1
vaddpd ymm0,ymm0,ymm6
@ttsiodras
ttsiodras / gist:e82c9d26f64e4c919bf6b34a033ed4fe
Created July 18, 2022 20:17
uiCA experiments on my mandelbrot
ttsiod@mbair ~/Github/uiCA
(master)*$ as mandel.asm -o mandel.o
ttsiod@mbair ~/Github/uiCA
(master)*$ ./uiCA.py mandel.o
Throughput (in cycles per iteration): 12.00 - 15.07
- 12.00 on BDW
- 14.00 on HSW, IVB, SNB
- 14.50 on CLX
@ttsiodras
ttsiodras / gist:91203d875188884100258454ccd5de0c
Created July 18, 2022 20:36
Summary of uiCA results for "or eax,eax" replaced with "test eax,eax".
$ head -8 analysis_report_or.txt| tail -3 ; for i in analysis_report_* ; do echo $i ; tail -3 $i ; done
...
┌───────────────────────┬────────┬───────┬─────────────────────────────────────────────────────┬───────┐
│ MITE MS DSB LSD │ Issued │ Exec. │ Port 0 Port 1 Port 2 Port 3 Port 4 Port 5 │ Notes │
├───────────────────────┼────────┼───────┼─────────────────────────────────────────────────────┼───────┤
analysis_report_or.txt
├───────────────────────┼────────┼───────┼─────────────────────────────────────────────────────┼───────┤
│ 33 │ 33 │ 29 │ 9 9 11 │ │ Total
└───────────────────────┴────────┴───────┴─────────────────────────────────────────────────────┴───────┘
analysis_report_test.txt