Skip to content

Instantly share code, notes, and snippets.

View p4checo's full-sized avatar

André Pacheco Neves p4checo

View GitHub Profile
@p4checo
p4checo / simulator_cleaner.rb
Created July 25, 2019 11:20
Ruby script to list and selectively delete iOS simulators based on runtime
#!/usr/bin/env ruby
require 'JSON'
require 'optparse'
options = {}
OptionParser.new do |parser|
parser.banner = "Usage: simulator_cleaner.rb [options]"
@p4checo
p4checo / update_Xcode_Plug-ins_CompatibilityUUID.sh
Created March 29, 2016 10:59
update_Xcode_Plug-ins_CompatibilityUUID
#!/bin/bash
# based on (buggy on zsh)
#find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID
OLD_IFS=$IFS
IFS=$'\n'
BETA=""
@p4checo
p4checo / keybase.md
Last active February 7, 2016 16:13
Keybase.io proof

Keybase proof

I hereby claim:

  • I am p4checo on github.
  • I am apneves (https://keybase.io/apneves) on keybase.
  • I have a public key whose fingerprint is 91DA CA5C 480F D4D0 5575 B0E4 1249 94E5 2E87 54B8

To claim this, I am signing this object:

@p4checo
p4checo / new_example_runs
Last active December 17, 2015 13:19
new readwriterqueue-bench example runs, with updated code
|----------- Min ------------|------------ Max ------------|------------ Avg ------------|
Benchmark | RWQ | SPSC | Folly | RWQ | SPSC | Folly | RWQ | SPSC | Folly | xSPSC | xFolly
------------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-------+-------
Raw add | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.53x | 0.38x
Raw remove | 0.0003s | 0.0003s | 0.0004s | 0.0003s | 0.0003s | 0.0004s | 0.0003s | 0.0003s | 0.0004s | 1.25x | 1.78x
Raw empty remove | 0.0007s | 0.0006s | 0.0006s | 0.0013s | 0.0007s | 0.0006s | 0.0011s | 0.0007s | 0.0006s | 0.58x | 0.54x
Single-threaded | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.95x | 0.95x
Mostly add | 0.0073s | 0.0062s | 0.0064s | 0.0077s | 0.0066s | 0.0064s | 0.0075s | 0.0064s | 0.0064s | 0.85x | 0.85x
Mostly remove | 0.0064s | 0.0062s | 0.00
@p4checo
p4checo / example_run_1
Created May 20, 2013 21:05
readwriterqueue-bench example runs including folly's ProducerConsumerQueue
| Min | Max | Avg
Benchmark | RWQ | SPSC | PCQ | RWQ | SPSC | PCQ | RWQ | SPSC | Mult | PCQ | Mult
------------------+---------+---------+---------+---------+---------+---------+---------+---------+------+---------+------
Raw add | 0.0009s | 0.0060s | 0.0003s | 0.0009s | 0.0060s | 0.0003s | 0.0009s | 0.0060s | 6.9x | 0.0003s | 0.4x
Raw remove | 0.0008s | 0.0003s | 0.0004s | 0.0008s | 0.0003s | 0.0004s | 0.0008s | 0.0003s | 0.4x | 0.0004s | 0.5x
Raw empty remove | 0.0023s | 0.0007s | 0.0007s | 0.0023s | 0.0007s | 0.0007s | 0.0023s | 0.0007s | 0.3x | 0.0007s | 0.3x
Single-threaded | 0.0046s | 0.0043s | 0.0042s | 0.0046s | 0.0043s | 0.0042s | 0.0046s | 0.0043s | 0.9x | 0.0042s | 0.9x
Mostly add | 0.0072s | 0.0119s | 0.0073s | 0.0077s | 0.0165s | 0.0074s | 0.0074s | 0.0150s | 2.0x | 0.0073s | 1.0x
Mostly remove | 0.0076s | 0.0082s |
@p4checo
p4checo / readwriterqueue-bench_otool_dump
Created May 20, 2013 20:59
readwriterqueue-bench assembly dump using otool -tV
readwriterqueue-bench:
(__TEXT,__text) section
_main:
0000000100000ab0 pushq %rbp
0000000100000ab1 movq %rsp,%rbp
0000000100000ab4 pushq %r15
0000000100000ab6 pushq %r14
0000000100000ab8 pushq %r13
0000000100000aba pushq %r12
0000000100000abc pushq %rbx
@p4checo
p4checo / TripleBuffer.hxx
Last active December 16, 2015 19:29
TripleBufferBenchmark
//============================================================================
// Name : TripleBuffer.hxx
// Author : André Pacheco Neves
// Version : 1.0 (27/01/13)
// Copyright : Copyright (c) 2013, André Pacheco Neves
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright