Skip to content

Instantly share code, notes, and snippets.

View fiigii's full-sized avatar

Fei Peng fiigii

View GitHub Profile
@fiigii
fiigii / WhatIsStrictAliasingAndWhyDoWeCare.md
Created November 5, 2019 05:56 — forked from shafik/WhatIsStrictAliasingAndWhyDoWeCare.md
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@fiigii
fiigii / v8.md
Created September 27, 2018 23:19 — forked from kevincennis/v8.md
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • sudo nano ~/.bash_profile
  • Add export PATH=/path/to/depot_tools:"$PATH" (it's important that depot_tools comes first here)
@fiigii
fiigii / 分布式系统学习资料.md
Created August 26, 2018 10:05 — forked from zjhiphop/分布式系统学习资料.md
分布式系统学习资料

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

This file has been truncated, but you can view the full file.
****** START compiling System.ParseNumbers:LongToString(long,int,int,char,int):ref (MethodHash=11d4d71b)
Generating code for Windows x64
OPTIONS: compCodeOpt = BLENDED_CODE
OPTIONS: compDbgCode = true
OPTIONS: compDbgInfo = true
OPTIONS: compDbgEnC = false
OPTIONS: compProcedureSplitting = false
OPTIONS: compProcedureSplittingEH = true
OPTIONS: Jit invoked for ngen
OPTIONS: Stack probing is DISABLED
@fiigii
fiigii / 2.asm
Last active December 9, 2017 02:31
G_M25687_IG01:
push rbp
push rdi
push rsi
sub rsp, 544
lea rbp, [rsp+230H]
mov rsi, rcx
lea rdi, [rbp-200H]
mov ecx, 114
xor rax, rax
@fiigii
fiigii / dissam.asm
Last active December 8, 2017 22:45
G_M10468_IG01:
push rbp
push rdi
push rsi
sub rsp, 688
lea rbp, [rsp+20H]
mov rsi, rcx
lea rdi, [rbp+18H]
mov ecx, 156
xor rax, rax
@fiigii
fiigii / crcBench.cs
Created December 8, 2017 19:03
Hash Funtion CRC32 vs Software
using System;
using System.Runtime.Intrinsics.X86;
using System.Linq;
using System.Diagnostics;
namespace testcrc
{
class Program
{
private static long iteration = 100000000;
@fiigii
fiigii / gist:ce8d1f5d02a7b6fbb83f04e1f7e1c582
Created August 16, 2017 20:41 — forked from alimd/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@fiigii
fiigii / GetCustomAttribute.md
Created April 21, 2017 22:33
GetCustomAttribute JIT Diff
optimized baseline
push rbp push rbp
push r15 push r15
push r14 push r14
pu