Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import numpy as np
size = 10000
arr1 = np.random.rand(size, size)
arr1 = np.random.rand(size, size)
arr1 = np.random.rand(size, size)
PERF_COUNT_HW_CPU_CYCLES:9.71%
0x4f9460 py = y + yy ../python/dijkstra.py:141
0x4f7860 PyEval_CallObjectWithKeywords python3
0x4f83a0 PyEval_CallObjectWithKeywords python3
0x4f9460 solution = dijkstra(graph) ../python/dijkstra.py:157
0x4f7860 PyEval_CallObjectWithKeywords python3
0x4f83a0 PyEval_CallObjectWithKeywords python3
0x4f9460 run() ../python/dijkstra.py:172
0x4f7860 PyEval_CallObjectWithKeywords python3
0x4f83a0 PyEval_CallObjectWithKeywords python3
PERF_COUNT_HW_CPU_CYCLES:31.65%
0x7f16c1b82600 __iscanonicall /lib/x86_64-linux-gnu/libm.so.6
0x7f16b9a5db3b PyUFunc_d_d /home/ychen/.local/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-x86_64-linux-gnu.so
0x7f16b9b78090 trivial_two_operand_loop /home/ychen/.local/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-x86_64-linux-gnu.so
0x7f16b9b7c770 execute_legacy_ufunc_loop /home/ychen/.local/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-x86_64-linux-gnu.so
0x7f16b9b7e950 PyUFunc_GenericFunction /home/ychen/.local/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-x86_64-linux-gnu.so
0x7f16b9b81540 ufunc_generic_call /home/ychen/.local/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-x86_64-linux-gnu.so
0x57ea70 _PyObject_FastCallKeywords python3
0x4f83a0 PyEval_CallObjectWithKeywords python3
0x4f9460 arr3 = np.log(arr3) ../python/num.py:15
@cycyyy
cycyyy / lurker.page_rank.cpp
Last active June 26, 2019 18:16
lurker.page_rank.cpp
#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <string>
#include <sstream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>