惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - 凌度

unity加密方案 [C#]AES加解密 vs20109自动补全unity 机器学习 爬取tieba的APP点赞等数据 爬取douyin 数据仓库和数据湖 通过mitmproxy爬取APP的数据 linux下检查网络连通情况 linux下使用clamav排查病毒 GIT统计代码行数 [linux]测硬盘读写速度、内存读写速度 QPS/TPS的预估 tornado多进程模式不同进程写不同日志 [linux]查看进程占用内存 [linux]杀死同一个应用的所有进程 [LINUX] 快速回收连接 jdbc批量写入 Python执行时间的计算方法
[python]pypy优化python性能
凌度 · 2019-09-20 · via 博客园 - 凌度

下载地址:https://pypy.org/download.html

# python2.7版本
yum install pypy
# python3.6版本
https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.1-src.tar.bz2
# python3.5版本
wget https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-src.tar.bz2

# 编译环境准备
yum -y install gcc
yum -y install gcc-c++
yum install libffi-devel

wget  https://pkg-config.freedesktop.org/releases/pkg-config-0.29.tar.gz
tar -zxvf pkg-config-0.29.tar.gz
cd pkg-config-0.29
./configure --with-internal-glib
make & make install

wget https://files.pythonhosted.org/packages/44/39/6bcb83cae0095a31b6be4511707fdf2009d3e29903a55a0494d3a9a2fac0/PyMySQL-0.8.1.tar.gz
cd PyMySQL-0.8.1/
tar zxvf PyMySQL-0.8.1.tar.gz
pypy3 setup.py install

  #pypy3 -m pip install PyMySQL

  #pypy3 -m pip install tensorflow==2.0.0-beta1

 

# 
tar -xjf pypy3.5-v7.0.0-src.tar.bz2 

  cd pypy3.5-v7.0.0-src/

  make

ln -s /data/download/pypy3.5-v7.0.0-src/pypy/goal/pypy3-c /usr/bin/pypy3

ln -s /data/download/pypy3.5-v7.0.0-src/pypy/goal/pypy3-c /usr/bin/pypy


安装pip

wget https://bootstrap.pypa.io/get-pip.py
pypy get-pip.py

用[pypy]/bin下的pip安装第三方库

.\pip.exe install tornado
.\pip.exe install redis
或者
pypy -m pip install package 

可能需要修改py添加路径

import sys
import os

parent_path = os.path.dirname(sys.path[0])
if parent_path not in sys.path:
    sys.path.append(parent_path)
    print(parent_path)

执行

D:\tools\pypy3.6-v7.1.1-win32\pypy3.exe test_client.py