推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
csysly123
V2EX  ›  Python

新手,请教一个问题

  •  
  •   csysly123 · Oct 16, 2019 · 3524 views
    This topic created in 2415 days ago, the information mentioned may be changed or developed.
    我有一张图片,然后要把图片的每个像素调用同一个函数进行加密运算(每个像素加密过程独立),现在是采用循环顺序对每个像素进行处理,感觉这样效率太低了,有没有办法可以让多个像素并行处理,提高处理效率。。
    4 replies    2019-10-20 22:47:18 +08:00
    arrow8899
        1
    arrow8899  
       Oct 16, 2019
    多线程 or 多进程? python 的话有 numpy 可以用,还是慢的话可以用 GPU 来跑。
    aaronhua
        2
    aaronhua  
       Oct 17, 2019
    cython 可以么
    laravel
        3
    laravel  
       Oct 17, 2019
    把像素们分块儿,让多个线程 /进程 /协程并发处理
    necomancer
        4
    necomancer  
       Oct 20, 2019
    1. 尽量使用数学语言表达,然后用带 mkl 的 numpy,例如 anaconda;
    2. numba.njit
    3. numba.cuda.jit
    4. cython openmp
    5. multiprocessing
    6. pp
    ....
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5297 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 281ms · UTC 07:44 · PVG 15:44 · LAX 00:44 · JFK 03:44
    ♥ Do have faith in what you're doing.