If you're thinking of checking out the Pony programming language, here's a list of things that I think are important to know. This list is based on a Tweet that I wrote.
There are Pony packages for several popular editors.
If you're thinking of checking out the Pony programming language, here's a list of things that I think are important to know. This list is based on a Tweet that I wrote.
There are Pony packages for several popular editors.
import z3 | |
def sym_xoroshiro128plus(solver, sym_s0, sym_s1, mask, result): | |
s0 = sym_s0 | |
s1 = sym_s1 | |
sym_r = (sym_s0 + sym_s1) | |
condition = z3.Bool('c0x%0.16x' % result) | |
solver.add(z3.Implies(condition, (sym_r & mask) == result & mask)) |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
namespace ConsoleApp13 | |
{ | |
class Program | |
{ |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
why doesn't radfft support AVX on PC?
So there's two separate issues here: using instructions added in AVX and using 256-bit wide vectors. The former turns out to be much easier than the latter for our use case.
Problem number 1 was that you positively need to put AVX code in a separate file with different compiler settings (/arch:AVX for VC++, -mavx for GCC/Clang) that make all SSE code emitted also use VEX encoding, and at the time radfft was written there was no way in CDep to set compiler flags for just one file, just for the overall build.
[There's the GCC "target" annotations on individual funcs, which in principle fix this, but I ran into nasty problems with this for several compiler versions, and VC++ has no equivalent, so we're not currently using that and just sticking with different compilation units.]
The other issue is to do with CPU power management.
22 com.apple.iWork.Keynote | |
18 com.apple.iWork.Pages | |
16 com.apple.iWork.Numbers | |
15 com.apple.iPhoto | |
13 com.microsoft.Powerpoint | |
9 com.microsoft.Excel | |
9 com.apple.logic.pro | |
9 com.adobe.Photoshop | |
8 com.microsoft.Outlook | |
7 com.microsoft.Word |
use std::io::{self, BufReader, BufWriter, Read, Write}; | |
use std::slice; | |
use std::env; | |
use std::fs; | |
extern crate etherparse; | |
use etherparse::*; | |
mod pcap; |
#include <unordered_map> | |
#include <string> | |
#include <vector> | |
const int numOfStrings = 100000; | |
const int numOfIterations = 1000; | |
// adapted from: https://medium.com/@griffinish/c-and-golang-neck-and-neck-on-maps-e7867adfadc6 | |
// g++ -std=c++0x -O3 -o maps_cxx maps.cpp | |
// | |
// time ./maps_cxx |
using System; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.Intrinsics; | |
using System.Runtime.Intrinsics.X86; | |
using System.Threading; | |
namespace ObjectPools | |
{ | |
public class FastRefPool<T> where T : class | |
{ |