Skip to content

Instantly share code, notes, and snippets.

View snk4tr's full-sized avatar
👨‍💻
Building predictive models

Sergey Kastryulin snk4tr

👨‍💻
Building predictive models
View GitHub Profile
@snk4tr
snk4tr / benchmark.py
Created February 25, 2019 15:55 — forked from RomanSteinberg/benchmark.py
Benchmark parallel execution
from multiprocessing import Process, Queue, Event
from queue import Empty as QueueEmpty
from random import randint, seed
from time import monotonic as now
from datetime import timedelta
TASKS_COUNT = 12
ARRAY_SIZE = 2_000_000
POOL_SIZE = 2