Skip to content

Instantly share code, notes, and snippets.

View y1yang0's full-sized avatar

Yi Yang y1yang0

  • 09:22 (UTC +08:00)
View GitHub Profile
@y1yang0
y1yang0 / latency.txt
Created September 25, 2023 06:02 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
This file has been truncated, but you can view the full file.
[Basic Information]
Version : (Alibaba Dragonwell Extended Edition 8.13.14) (1.8.0_352-b01) (25.352-b01)
Dump Reason : JCMD
MaxMetaspaceSize : 18446744073709547520 B
CompressedClassSpaceSize : 1073741824 B
Class Space Used : 309992 B
Class Space Capacity : 395264 B
Class Space Committed : 524288 B
Class Space Reserved : 1073741824 B
NonClass Spaces Used : 2638224 B
{
"basic": {
"version": "JDK11",
"used": 1234,
"max": 4567,
"timestamp": 35783292
},
"symbols": [
{
"id": 123,
#include <iostream>
#include <vector>
#include <algorithm>
#include <memory>
bool permutation_std(int n);
bool permutation(int n);
static void permutation_impl(std::vector<int> arr, int n, int cur);
#ifdef _MSC_VER
@y1yang0
y1yang0 / happyValentinesDay.cpp
Last active February 14, 2017 10:06
happyValentinesDay
/* Happy Valentine's Day
* Built on vs2013
* 2017.2.14
*/
#include <iostream>
#include <cassert>
template<int _letter_id>
struct CharWrapper{
typedef void(CharWrapper::*FuncPtrType)(void);
REG ADD "HKCU\Control Panel\Desktop" /v DpiScalingVer /t REG_DWORD /d 0x00001018 /f
REG ADD "HKCU\Control Panel\Desktop" /v Win8DpiScaling /t REG_DWORD /d 0x00000001 /f
REG ADD "HKCU\Control Panel\Desktop" /v Logpixels /t REG_DWORD /d 0x00000078 /f