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
<!doctype html> | |
<html lang="en-us"> | |
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon"> | |
<body> | |
<style> | |
pre { | |
border: 1px solid #eee; | |
margin: 10px 0; | |
font-family: monospace; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<!doctype html> | |
<html lang="en-us"> | |
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon"> | |
<body> | |
<style> | |
pre { | |
border: 1px solid #eee; | |
margin: 10px 0; | |
font-family: monospace; |
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
const encoder = new TextEncoder('utf-8'); | |
const decoder = new TextDecoder('utf-8'); | |
const TAG_MASK = 0x3; | |
const TAG_INT32 = 0; | |
const TAG_FLOAT64 = 1; | |
const TAG_STRING = 2; | |
function encode(cells) { |
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 zipfile, sys | |
zip = zipfile.ZipFile(sys.argv[1]) | |
for f in zip.infolist(): | |
# I have no idea about the +2 but observed experimentally that it gets us | |
# to the right place. | |
print('%-16x %-10d %s' % (f.header_offset + len(f.FileHeader()) + 2, f.compress_size, f.filename)) |
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
$ sudo cpupower frequency-set -g powersave | |
$ sudo sh -c "echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo | |
$ for cpu in /sys/devices/system/cpu/cpu*; do for p in $(seq 4); do sudo sh -c "echo 1 > $cpu/cpuidle/state$p/disable"; done; do | |
#################### | |
# Use emplace_back() | |
#################### | |
$ perf stat out/offlnx/ctest | |
tcmalloc: large alloc 1600000000 bytes == 0x349af33da000 @ |
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
$ sudo cpupower frequency-set -g powersave | |
$ sudo sh -c "echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo | |
$ for cpu in /sys/devices/system/cpu/cpu*; do for p in $(seq 4); do sudo sh -c "echo 1 > $cpu/cpuidle/state$p/disable"; done; do | |
######################### | |
# F1, use data() directly | |
######################### | |
$ perf stat out/offlnx/ctest 1 | |
Performance counter stats for 'out/offlnx/ctest 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
context: crbug.com/708990 | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
struct Category { | |
const char *name; | |
uint8_t is_enabled; | |
}; |
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 <string.h> | |
struct Category { | |
const char *name; | |
uint8_t is_enabled; | |
}; | |
constexpr uint32_t N = 100; |
NewerOlder