(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // InflatableSeqLock | |
| // Copyright(C) 2016 Oracle and/or its affiliates | |
| // Dave Dice : https://blogs.oracle.com/dave | |
| // | |
| // Remarks: | |
| // * Implements composite writer mutex and seqlock in a single word-sized lock. | |
| // Allows optimistic reading and pessimistic writing. | |
| // Readers don't write to shared synchronization metadata, which helps avoid | |
| // coherence traffic. Readers must tolerate observing inconsistent state, however. | |
| // * Writer mutex is based on LIFO-CR lock from http://arxiv.org/abs/1511.06035. |
| // Build: g++ -O3 -std=gnu++14 -m64 MonoTime.cc -lpthread -o MonoTime -mmemory-model=tso | |
| // | |
| // Dave Dice -- blogs.oracle.com/dave | |
| #include <thread> | |
| #include <chrono> | |
| #include <iostream> | |
| #include <vector> | |
| #include <mutex> | |
| #include <random> |
| #include <chrono> | |
| #include <string> | |
| #include <sstream> | |
| #include <vector> | |
| #include <iostream> | |
| std::string to_string(const int i) | |
| { | |
| std::stringstream ss; | |
| ss << i; |
| // | |
| // Generate benchmarks for the three queue implementations shown in | |
| // Jeff Preshing's CppCon 2014 talk, "How Ubisoft Montreal Develops Games for | |
| // Multicore - Before and After C++11". | |
| // | |
| // Slides: https://github.com/CppCon/CppCon2014/blob/master/Presentations/How%20Ubisoft%20Montreal%20Develops%20Games%20for%20Multicore/How%20Ubisoft%20Montreal%20Develops%20Games%20for%20Multicore%20-%20Before%20and%20After%20C++11%20-%20Jeff%20Preshing%20-%20CppCon%202014.pdf?raw=true | |
| // | |
| #include <iostream> | |
| #include <atomic> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Connections: 8 Haywire Requests/sec: 57334.75
Connections: 8 Go Requests/sec: 42901.57
-------------------------------------------------------
Connections: 16 Haywire Requests/sec: 71460.01
Connections: 16 Go Requests/sec: 71891.07
-------------------------------------------------------
Connections: 32 Haywire Requests/sec: 78421.15
Connections: 32 Go Requests/sec: 89202.96
| from requests_oauthlib import OAuth2Session | |
| from flask import Flask, request, redirect, session, url_for | |
| from flask.json import jsonify | |
| import os | |
| app = Flask(__name__) | |
| # This information is obtained upon registration of a new GitHub | |
| client_id = "<your client key>" |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| ------- data ------ --------------------- load -------------------- - child - | |
| keys mem clients blocked requests connections | |
| 577999 113.36M 1 0 0 (+0) 1 | |
| 748999 138.92M 1 0 1 (+0) 1 | |
| 922999 169.01M 1 0 2 (+1) 1 | |
| 1076999 211.63M 1 0 3 (+1) 1 | |
| 1216999 235.84M 1 0 4 (+1) 1 | |
| 1366999 253.78M 1 0 5 (+1) 1 | |
| 1520999 280.39M 1 0 6 (+1) 1 | |
| 1675999 307.18M 1 0 7 (+1) 1 |
| Add-Type -Path "C:\Program Files (x86)\AWS SDK for .NET\bin\AWSSDK.dll" | |
| $region="ap-northeast-1" | |
| $accesskey="ACCESSKEY" | |
| $secretkey="SECRETKEY" | |
| $vaultname="myvault" | |
| $description="some binary file" | |
| $file="c:\hoge\target.bin" | |
| $endpoint = [Amazon.RegionEndpoint]::GetBySystemName($region) |