gcc -O3 -Wall -mavx2 read_write.c -DPROGRAM2
/Users/yuuya_uezato/cache$ for i in {0..10}; do ./a.out ; done
cache1 <- cache1 + mem1
elapsed = 353.935910 ms
cache1 <- cache1 + mem1
elapsed = 359.755992 ms
cache1 <- cache1 + mem1
elapsed = 363.224911 ms
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 this file via `g++ -std=c++11 (-O3) FILENAME` */ | |
#include <iostream> | |
#include <set> | |
#include <tuple> | |
#include <algorithm> | |
#include <ctime> | |
#include <chrono> | |
using namespace std; |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <time.h> | |
#include <immintrin.h> | |
__attribute__((noinline)) | |
double milliDiff(struct timespec *start, struct timespec *end) | |
{ | |
return |
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 <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <immintrin.h> | |
#include <xmmintrin.h> | |
#include <time.h> | |
#include <string.h> | |
double milliDiff(struct timespec *start, struct timespec *end) | |
{ |
$ gcc -O3 -Wall -mavx2 xor_program.c -DPROGRAM1
$ ./a.out
elapsed = 55.105000
$ gcc -O3 -Wall -mavx2 xor_program.c -DPROGRAM2
$ ./a.out
elapsed = 31.889001
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 <stdio.h> | |
#include <assert.h> | |
#include <string.h> | |
#include <time.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
double to_milli(struct timespec *time) | |
{ | |
return |
typedef struct Type {
uint32_t v[2];
} Type;
memcpy1(){
...
for(...) {
b[i].v[0] = a[i].v[0];
b[i].v[1] = a[i].v[1];
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 <stdio.h> | |
#include <getopt.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <sysexits.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <ctype.h> | |
#include <stdbool.h> |
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
#!/usr/local/bin/bpftrace | |
#include "gfp.h" | |
#include "ahci.h" | |
#include <linux/fs.h> | |
#include <linux/uio.h> | |
#include <linux/bio.h> | |
#include <linux/genhd.h> | |
#include <linux/blkdev.h> | |
#include <scsi/scsi_device.h> |
NewerOlder