Codon python compiler for windows

Codon

Docs
 · 
FAQ
 · 
Blog
 · 
Chat
 · 
Roadmap
 · 
Benchmarks

Build Status

What is Codon?

Codon is a high-performance Python implementation that compiles to native machine code without
any runtime overhead. Typical speedups over vanilla Python are on the order of 10-100x or more, on
a single thread. Codon’s performance is typically on par with (and sometimes better than) that of
C/C++. Unlike Python, Codon supports native multithreading, which can lead to speedups many times
higher still.

Think of Codon as Python reimagined for static, ahead-of-time compilation, built from the ground
up with best possible performance in mind.

Goals

  • 💡 No learning curve: Be as close to CPython as possible in terms of syntax, semantics and libraries
  • 🚀 Top-notch performance: At least on par with low-level languages like C, C++ or Rust
  • 💻 Hardware support: Full, seamless support for multicore programming, multithreading (no GIL!), GPU and more
  • 📈 Optimizations: Comprehensive optimization framework that can target high-level Python constructs
    and libraries
  • 🔋 Interoperability: Full interoperability with Python’s ecosystem of packages and libraries

Non-goals

  • Drop-in replacement for CPython: Codon is not a drop-in replacement for CPython. There are some
    aspects of Python that are not suitable for static compilation — we don’t support these in Codon.
    There are ways to use Codon in larger Python codebases via its JIT decorator
    or Python extension backend. Codon also supports
    calling any Python module via its Python interoperability.
    See also «Differences with Python» in the docs.

  • New syntax and language constructs: We try to avoid adding new syntax, keywords or other language
    features as much as possible. While Codon does add some new syntax in a couple places (e.g. to express
    parallelism), we try to make it as familiar and intuitive as possible.

Install

Pre-built binaries for Linux (x86_64) and macOS (x86_64 and arm64) are available alongside each release.
Download and install with:

/bin/bash -c "$(curl -fsSL https://exaloop.io/install.sh)"

Or you can build from source.

Examples

Codon is a Python-compatible language, and many Python programs will work with few if any modifications:

def fib(n):
    a, b = 0, 1
    while a < n:
        print(a, end=' ')
        a, b = b, a+b
    print()
fib(1000)

The codon compiler has a number of options and modes:

# compile and run the program
codon run fib.py
# 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

# compile and run the program with optimizations enabled
codon run -release fib.py
# 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

# compile to executable with optimizations enabled
codon build -release -exe fib.py
./fib
# 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

# compile to LLVM IR file with optimizations enabled
codon build -release -llvm fib.py
# outputs file fib.ll

See the docs for more options and examples.

You can import and use any Python package from Codon. For example:

from python import matplotlib.pyplot as plt
data = [x**2 for x in range(10)]
plt.plot(data)
plt.show()

(Just remember to set the CODON_PYTHON environment variable to the CPython shared library,
as explained in the the docs.)

This prime counting example showcases Codon’s OpenMP support, enabled
with the addition of one line. The @par annotation tells the compiler to parallelize the
following for-loop, in this case using a dynamic schedule, chunk size of 100, and 16 threads.

from sys import argv

def is_prime(n):
    factors = 0
    for i in range(2, n):
        if n % i == 0:
            factors += 1
    return factors == 0

limit = int(argv[1])
total = 0

@par(schedule='dynamic', chunk_size=100, num_threads=16)
for i in range(2, limit):
    if is_prime(i):
        total += 1

print(total)

Codon supports writing and executing GPU kernels. Here’s an example that computes the
Mandelbrot set:

import gpu

MAX    = 1000  # maximum Mandelbrot iterations
N      = 4096  # width and height of image
pixels = [0 for _ in range(N * N)]

def scale(x, a, b):
    return a + (x/N)*(b - a)

@gpu.kernel
def mandelbrot(pixels):
    idx = (gpu.block.x * gpu.block.dim.x) + gpu.thread.x
    i, j = divmod(idx, N)
    c = complex(scale(j, -2.00, 0.47), scale(i, -1.12, 1.12))
    z = 0j
    iteration = 0

    while abs(z) <= 2 and iteration < MAX:
        z = z**2 + c
        iteration += 1

    pixels[idx] = int(255 * iteration/MAX)

mandelbrot(pixels, grid=(N*N)//1024, block=1024)

GPU programming can also be done using the @par syntax with @par(gpu=True).

Documentation

Please see docs.exaloop.io for in-depth documentation.

Codon

Docs
 | 
FAQ
 | 
Blog
 | 
Forum
 | 
Chat
 | 
Benchmarks

Build Status

What is Codon?

Codon is a high-performance Python compiler that compiles Python code to native machine code without any runtime overhead.
Typical speedups over Python are on the order of 10-100x or more, on a single thread. Codon’s performance is typically on par with
(and sometimes better than) that of C/C++. Unlike Python, Codon supports native multithreading, which can lead to speedups many
times higher still. Codon grew out of the Seq project.

Install

Pre-built binaries for Linux (x86_64) and macOS (x86_64 and arm64) are available alongside each release.
Download and install with:

/bin/bash -c "$(curl -fsSL https://exaloop.io/install.sh)"

Or you can build from source.

Examples

Codon is a Python-compatible language, and many Python programs will work with few if any modifications:

def fib(n):
    a, b = 0, 1
    while a < n:
        print(a, end=' ')
        a, b = b, a+b
    print()
fib(1000)

The codon compiler has a number of options and modes:

# compile and run the program
codon run fib.py
# 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

# compile and run the program with optimizations enabled
codon run -release fib.py
# 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

# compile to executable with optimizations enabled
codon build -release -exe fib.py
./fib
# 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

# compile to LLVM IR file with optimizations enabled
codon build -release -llvm fib.py
# outputs file fib.ll

See the docs for more options and examples.

This prime counting example showcases Codon’s OpenMP support, enabled with the addition of one line.
The @par annotation tells the compiler to parallelize the following for-loop, in this case using a dynamic schedule, chunk size
of 100, and 16 threads.

from sys import argv

def is_prime(n):
    factors = 0
    for i in range(2, n):
        if n % i == 0:
            factors += 1
    return factors == 0

limit = int(argv[1])
total = 0

@par(schedule='dynamic', chunk_size=100, num_threads=16)
for i in range(2, limit):
    if is_prime(i):
        total += 1

print(total)

Codon supports writing and executing GPU kernels. Here’s an example that computes the
Mandelbrot set:

import gpu

MAX    = 1000  # maximum Mandelbrot iterations
N      = 4096  # width and height of image
pixels = [0 for _ in range(N * N)]

def scale(x, a, b):
    return a + (x/N)*(b - a)

@gpu.kernel
def mandelbrot(pixels):
    idx = (gpu.block.x * gpu.block.dim.x) + gpu.thread.x
    i, j = divmod(idx, N)
    c = complex(scale(j, -2.00, 0.47), scale(i, -1.12, 1.12))
    z = 0j
    iteration = 0

    while abs(z) <= 2 and iteration < MAX:
        z = z**2 + c
        iteration += 1

    pixels[idx] = int(255 * iteration/MAX)

mandelbrot(pixels, grid=(N*N)//1024, block=1024)

GPU programming can also be done using the @par syntax with @par(gpu=True).

What isn’t Codon?

While Codon supports nearly all of Python’s syntax, it is not a drop-in replacement, and large codebases might require modifications
to be run through the Codon compiler. For example, some of Python’s modules are not yet implemented within Codon, and a few of Python’s
dynamic features are disallowed. The Codon compiler produces detailed error messages to help identify and resolve any incompatibilities.

Codon can be used within larger Python codebases via the @codon.jit decorator.
Plain Python functions and libraries can also be called from within Codon via
Python interoperability.

Documentation

Please see docs.exaloop.io for in-depth documentation.

Информатика

Codon: компилятор Python

Компиляция python в машинный код с помощью компилятора LLVM.

У Python в течение многих лет не было хорошего компилятора, который компилировал бы эффективный машинный код. Python сам по себе не самый быстрый язык, а нативный код C превосходит его во много раз. Для систем реального времени, игр, симуляций, обработки сигналов и приложений для научных вычислений без таких библиотек, как numpy, базовый python слишком медленный. Были и другие компиляторы, которые компилируют в машинный код, но они не создают исполняемые файлы и часто требуют некоторой интерпретации во время выполнения. Есть PyPy, который компилируется JIT, но он использует только ограниченный набор python и по-прежнему требует интерпретации во время выполнения от байт-кода до машинного кода, специфичного для процессора.

Однако недавно появился новый компилятор Python, который мне кажется интересным. Codon от Exaloop — это новый компилятор Python, который может напрямую компилироваться в машинный код. Он использует структуру LLVM для компиляции в байт-код LLVM, а затем в конкретный машинный код. Я заинтригован, потому что с этими дополнениями Python становится полезным для многих приложений, которых раньше не было. Игры потому, что это возможно, потому что они требуют множества матричных вычислений в режиме реального времени, которые такие библиотеки, как Numpy, делают невозможными. Научные вычисления, хотя с векторизованными операциями в numpy выполнимы, сильно ограничивают возможности языка, которые можно использовать; обычно нельзя использовать собственные циклы Python.

Есть системы реального времени, которые меня интересуют, такие как обработка сигналов и звука, которые требуют быстрых вычислений, которые Python не может сделать легко, и часто требуют расширений C/C++. Другие приложения, такие как машинное обучение, часто требуют собственных расширений в библиотеках, таких как Tensorflow, но теперь из-за компиляторов, таких как Codon, вероятно, можно обойтись без них.

Бенчмаркинг

Для сравнения я сначала напишу декоратор в файле с именем Timing.py. Этот декоратор принимает функцию и возвращает обернутую функцию, которая умножает время, в течение которого входная функция выполняется в среднем в наносекундах после определенного количества попыток.

import time


def perf_time(n=4):
    """Decorator which times function on average

    Args:
        n (int, optional): Number of times to run function. Defaults to 4.
    """

    def decorator(fn):
        def wrapper(*args, **kwargs):
            times = []
            for _ in range(n):
                start = time.perf_counter_ns()
                fn(*args, **kwargs)
                end = time.perf_counter_ns()
                dur = int(end - start)
                times.append(dur)
            avg = sum(times) / n
            print(f"Function took on average {avg}ns to run after {n} trials.")

        return wrapper

    return decorator

Затем я впервые использую простой факторный алгоритм в файле fac.py, используя цикл для вычисления 10 000!

from timing import perf_time


@perf_time(n=10)
def factorial(n):
    p = 1
    for k in range(2, n + 1):
        p *= k
    return p


factorial(10_000)

Мы запустим алгоритм, используя дефолтный интерпретатор CPython версии 3.10.

python fac.py

Функция выполнялась в среднем за 28766165,7 нс после 10 испытаний.

Теперь давайте попробуем скомпилировать с помощью Codon. Чтобы скомпилировать этот файл, мы запускаем команду.

codon build -release -exe fac.py

Опция -release компилирует код со всеми включенными оптимизациями, а опция -exe компилирует его в исполняемый файл.

Мы также можем просто запустить файл напрямую, не компилируя его в исполняемый файл с помощью этой команды.

codon run -release fac.py

При компиляции кода в системе Unix создается новый файл с именем fac, который можно запустить с помощью этой команды.

./fac

После запуска исполняемого файла мы получаем время, которое потребовалось для запуска.

Функция выполнялась в среднем за 69,8 нс после 10 испытаний.

Версия CPython заняла почти на 41 212 200% больше времени, чем версия Codon. Святое дерьмо, это впечатляет, действительно впечатляет.

Давайте попробуем другой алгоритм, сортировку выбором, которая находит минимальный элемент после каждого индекса и меняет его местами с текущим элементом. Мы отсортируем список из 1000 случайных чисел, которые будут перетасованы.

import random
from timing import perf_time


@perf_time(n=10)
def selection_sort(l):
    for i in range(len(l) - 1):
        min_idx = i
        for j in range(i + 1, len(l)):
            if l[j] < l[min_idx]:
                min_idx = j
        l[i], l[min_idx] = l[min_idx], l[i]


nums = [random.randint(0, 1000) for _ in range(1000)]
random.shuffle(nums)
selection_sort(nums)

После запуска получаем время версии CPython.

Функция выполнялась в среднем 5 102 0752,8 нс после 10 испытаний.

Принимая во внимание, что версия Codon занимает гораздо меньше времени.

Функция выполнялась в среднем за 1,01499e+06 нс после 10 испытаний.

Версия CPython заняла на 4927% больше времени, чем версия Codon. Более скромный выигрыш, но все же достаточный, чтобы оказать влияние.

графический процессор

Еще одной интересной особенностью Codon является его способность писать ядра для графического процессора. Эти программы работают на графическом процессоре, таком как шейдер, и могут выполнять параллельные вычисления на тысячах различных процессоров. В качестве примера из файла readme ядро ​​для вычисления множества Мандельброта будет выглядеть так.

import gpu

MAX    = 1000  # maximum Mandelbrot iterations
N      = 4096  # width and height of image
pixels = [0 for _ in range(N * N)]

def scale(x, a, b):
    return a + (x/N)*(b - a)

@gpu.kernel
def mandelbrot(pixels):
    idx = (gpu.block.x * gpu.block.dim.x) + gpu.thread.x
    i, j = divmod(idx, N)
    c = complex(scale(j, -2.00, 0.47), scale(i, -1.12, 1.12))
    z = 0j
    iteration = 0

    while abs(z) <= 2 and iteration < MAX:
        z = z**2 + c
        iteration += 1

    pixels[idx] = int(255 * iteration/MAX)

mandelbrot(pixels, grid=(N*N)//1024, block=1024)

С помощью декоратора gpu.kernel функцию можно превратить в программу GPU, которую можно запускать параллельно. Это значительно упрощает матричные, графические и математические операции без использования такой библиотеки, как numpy.

Недостатки

Есть несколько недостатков; до сих пор не были портированы общие библиотеки, такие как numpy, scikit-learn, scipy и даже игровые библиотеки, такие как pygame. Можно было бы заставить их работать, но пока мне это не удалось. Я также не мог использовать такие модули, как набор текста или functools с Codon. Я не мог использовать обертки, например, из functools, чтобы предоставить декоратору контекстную информацию. На данный момент Codon, похоже, лучше всего работает с современным ванильным питоном без дополнительных модулей или расширений. Если Codon будет включен в Python Foundation, возможно, будет проще интегрировать его с новыми функциями Python; однако на данный момент он полагается на обновления исключительно от Exaloop.

Стоит ли использовать Кодон? Возможно, если вам нужна более высокая производительность, а ваш код не требует много размышлений, типизированного Python или большинства библиотек. Если вы используете обширные библиотеки, это, вероятно, не лучший вариант, пока Codon не поддерживает эти библиотеки. Codon полезен, но пока он остается простым компилятором.

������� Exaloop ����������� ��� ������� Codon, ������������ ���������� ��� ����� Python, ��������� ������������ �� ������ ������ �������� ���, �� ����������� � Python runtime. ���������� ����������� �������� Python-��������� ����� Seq � ��������������� ��� ����������� ��� ��������. �������� ����� ������������ ����������� runtime ��� ����������� ������ � ���������� �������, ���������� ������������ ������ �� ����� Python. �������� ������ �����������, runtime � ����������� ���������� �������� � �������������� ������ C++ (� ������������ ��������� �� LLVM) � Python, � ���������������� ��� ��������� BSL (Business Source License).

�������� BSL ���� ���������� �������������� MySQL � �������� ������������ ������ Open Core. ���� BSL � ���, ��� ��� ����������� ���������������� ���������� �������� ��� �������� ���������, �� � ������� ������-�� ������� ����� ����������� ��������� ������ ��� ���������� �������������� �������, ��� ������ ������� ��������� ������������ ������������ ��������. �������������� ������������ ������� ������� �odon ������������ ������� ���� �� �������� Apache 2.0 ����� 3 ���� (1 ������ 2025 ����). �� ����� ������� �������� ��������� �����������, ��������������� � �����������, ��� ������� ������������� �� � ������������ �����.

������������������ ���������� �� ������ ����������� ������ ������������� ��� ������� � ����������, ���������� �� ����� ��. �� ��������� � �������������� CPython ������� ������������������ ��� ���������� � �������������� Codon ����������� � 10-100 ��� ��� ������������ ����������. ��� ���� � ������� �� Python � Codon ������������� ����������� ����������� ���������� ���������������, ������� ��������� �������� �ݣ �������� ���������� ������������������. Codon ����� ��������� ��������� ���������� �� ������ ��������� ������� ��� ������������� ����������������� ������������� � ������������ Python-��������.

Codon �������� � �������������� ��������� �����������, ����������� ���������� ���������������� ����� �������, ��� ������ ������� ����� ��������� ����� ����������, ������������� ����������� � ����������� � ���� ������������ ��������� ��������������� ����������. ��������, ����������� ����������� ��������� �������� ��� ������������� � �������������� � ���������� ����������. ��� ���������� ������� ������������ ������� ������ Boehm.

������������ �������������� ������� ����� ���������� Python, �� ���������� � �������� ��� ����������� ��� �����������, �������� ������������� Codon � �������� ���������� ������ CPython. ��������, �
Codon ��� ����� ����� ������������ 64-��������� ���
int, � �� ����� ��� � CPython ����������� ����� ����� �� ����������. ��� ���������� ������������� � Codon ������� ������� ��� ����� ������������� �������� ��������� � ���. ��� ������� ��������������� ������� ����������� ���������� ��� Codon ������̣���� Python-������� � �������������� ������������� ��������� ������������ ������������ �����. ��� ������ �������� ��������������� ���������� ������ ��������� ��������������� ��������� � ����������� ��� ����� ������ ��������� ��������.

  1. ������� ������ � ������� (https://github.com/exaloop/cod…)
  2. OpenNews: ������ Nuitka 1.2, ����������� ��� ����� Python
  3. OpenNews: � JIT-����������� Pyston-lite ����������� ��������� Python 3.10
  4. OpenNews: DeepMind ������ ��� S6, ���������� � ����������� JIT-����������� ��� CPython
  5. OpenNews: ������ Cython 0.27, ����������� ��� ����� Python
  6. OpenNews: ����������� HOPE, JIT-���������� ��� ����� Python, ������������� � C++
��������: CC BY 3.0 ���: ��������� �������� ������: https://opennet.ru/58395-codon �������� �����: codon, python, complie
  • 1.5, ���� (ok), 14:06, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +2 +/
    > ������� ���� �� �������� Apache 2.0 ����� 3 ���� (1 ������ 2025 ����)

    ��� 1 ������ 2025 ���� � ���������, � ���� ���!!!

     

  • 1.9, ���� (?), 14:17, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +6 +/
    ��������, ����� ������ ��������� ���� ��������� ���������� ������ ��� ����������?

    � �ӣ ������ ��� � ������ ����� ���������� ��� ���������, � BDFL � ��������� �������� «� ������� �ݣ ����� ������» �������� ���.

     
     
  • 2.12, ������ (12), 14:22, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +9 +/
    ��� �� �����, � ������ ������� ����������. ������, ��� � ����.
     
     
  • 3.19, ���� (?), 14:39, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +2 +/
    >��� �� �����, � ������ ������� ����������.

    ����-������ �������������, ������� ��������� ������������� � ����������� �� �����������.

     
  • 3.21, ���� (?), 15:03, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +1 +/
    ��� ����� ��� ���-�� �������, ���
     
  • 2.40, ����������� (?), 16:28, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +2 +/
    ��� �� ����� ��� ������� ������� ������� ����� ��������� ���������� �������.
     
     
  • 3.175, ������ (175), 19:16, 30/12/2022 [^] [^^] [^^^] [��������]  
  • +1 +/
    ��� ���� �� ������ :) ���������� ����� �� �������� � ������ �****�� �� �����������.
     
  • 2.78, Skullnet (ok), 19:41, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    ���, ���� ������� ���� � Go, � �������� �������� ����� ��� � ������� � 70� �����.

    ������� �������� �����������, ��������!

     
     
  • 3.112, ���� (?), 23:05, 27/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    ������� ��, ��, �, �++ ��� ��� ������ ������ ������������, ��� �� ������� �� ������ ��������� ��� ����� � ����� ��������.
     
     
  • 4.116, Skullnet (ok), 00:01, 28/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    > ������� ��, ��, �, �++ ��� ��� ������ ������ ������������, ��� ��

    > ������� �� ������ ��������� ��� ����� � ����� ��������.

    �� �� ���, �� ��������� � C++ ��� �� Go ���� ����� �� �����. ������������ ����������� Go — ��� ������ � �������� �� �������.

     
     
  • 5.124, ���� (?), 02:16, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    ����� ����, ����� ���� �ݣ 10 ��� ��������� � � ���� ������� ���� ������� �������������� ������� � ������, � ��������, � ������, � �������� ��������, � ����, � ���� ������ ����� ����.

    ����� �ݣ 10 ��� ���������, � ����� ���� � ���������� ������� ��� ��� ����.

    ����� �� �� ����� �� ������� ����������, �� ����ף�!

     
     
  • 6.155, ������ (155), 23:05, 28/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    ����� ��������� ���������, ������� �� ����� �����������, ��� .��� ��� ����. ����������� ���������� ���������� (msvc) � �� ������ ����� clang, ��� ��� ������������� ��� ����.

    � ����� ����, ��� ��� ���������  � ����������.
     
  • 5.125, Neon (??), 02:18, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +1 +/
    ��…�++ ���������� �� ����������� ����������, � �� �� ��� ����. ����������� ���������� ��������� ������������ ���� ��� ����, � �� ��� ������� �������������. � ��� ��� ������ ���������� ���� �������� ��� ������� ������������. ����, ������������� ������� � ����������� ���������� ����, � ������� ���. �� ��, ��� ������������ ������� ���� ����� ������������� � ������ ����������� ��� ������ � �����))).
     
     
  • 6.127, Skullnet (ok), 03:00, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    > ��…�++ ���������� �� ����������� ����������, � �� �� ��� ����. ����������� ����������

    > ��������� ������������ ���� ��� ����, � �� ��� ������� �������������. �

    > ��� ��� ������ ���������� ���� �������� ��� ������� ������������. ����, �������������

    > ������� � ����������� ���������� ����, � ������� ���. �� ��, ���

    > ������������ ������� ���� ����� ������������� � ������ ����������� ��� ������ �

    > �����))).

    Qt � Boost — ��� ����������� ���������� ��� �++, � �� ��� �����, ������� � STL.

     
  • 2.117, ������ (117), 00:01, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    > � ������ ����� ���������� ��� ��������� […] �������� ���.

    �� ��� ������������� ��������� ������ �� ����� �������? ��� �� �ң�?

    ��� ����� �� �� ��������� ������������� ������, � ��������, ��� ����� ������ � ���������� ������ ���������� �� ���������� ��������? ���� ������, ������, ���� ��� ��� ��� �ݣ ���������� �� ������ ���������� ��������? ���� ���, �� �� ������ �������������� ������� �� ���������� ��������, �� ������� �� ������� ����� ������������ ������?

     

  • 1.11, ������ (11), 14:22, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +12 +/
    �ӣ �������� � �������� �������� �����. � �� �ӣ ����� �� ���������� � �� ����������.
     
     
  • 2.18, ������ (16), 14:38, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +14 +/
    �� ����������, ��, ��� ����, � ����������.
     
     
  • 3.30, ������ (), 16:09, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    �������� �������� �� �� ��� � ����� ������ ��������� ���������� �������.
     
     
  • 4.150, ������ (16), 20:34, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    ����� �� ����� ���ģ�, �� ���������� �������� ����� ���������.
     
  • 3.167, Xdsff (?), 20:21, 29/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    �� �������� ������ ��������������� ��� ��������� ��� ������������� ��� ��
     
  • 2.176, ������ (175), 19:17, 30/12/2022 [^] [^^] [^^^] [��������]  
  • +1 +/
    ������ ��� ����� ���� ������, � �� ����������! :)
     

     
  • 2.24, ������ (24), 15:26, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +2 +/
    >������, �����-��, ������. ����� ��� ���������?

    ������� ����� ������ �� ���� ��������.

     
     
  • 3.177, ������ (175), 19:19, 30/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    �� ���������� ����������� �������?! ��-�����, ������ ������� ���������� (����� «���6ϣ…»).
     
  • 2.35, ���� ���� (ok), 16:13, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +2 +/
    �� ����� ����. ������� ������ �� ����, �������� �� ���������.
     
     
  • 3.51, ������ (), 16:43, 27/12/2022 [^] [^^] [^^^] [��������]  
  • –2 +/
    � ���� ������ ��� ��� �ӣ ��������� �����������, ��� � �� ����������.
     
     
  • 4.139, ���� ���� (ok), 09:05, 28/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    > ����� ��� �ţ ������ RMS?

    ������ ����� � ��������� ������, � �� ����������. ��, ����, � ����� ���������� �� ���-��� — �������� � ��� ���� ������ �����������. � ����� (����� ������ ������) — ������ ����. �������� ����������.

     
  • 2.49, _kp (ok), 16:42, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +1 +/
    ���� BSL..  � ������� ������-�� ������� ����� ����������� ��������� (�����) ������ ��� ���������� �������������� �������(����������), ��� ������ ������� ��������� (����)
     

  • 1.25, ������ (25), 16:00, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +2 +/
    �� �������� ��� �� C, �� �������� � ������������ ��� �� Python.

    �� ��� �� ����� ���� ����� ���������� ��������� �� ���, � ����� �������� ��������� � ����� �ӣ ��� �������-�������� ��� ����.

     
     
  • 2.105, ������ (), 22:38, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    >� ����� �������� ��������� � ����� �ӣ ��� �������-�������� ��� ����.

    �������� ��� — �������� �����.

     

  • 1.26, ������ (), 16:01, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +/
    > �������������� ������� ����� ���������� Python

    �� ��-���� ������������ ��� �� ��������. ��-����� ��� ����� �� ������ ���?

     
     
  • 2.29, ������ (29), 16:07, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +3 +/
    �������������� print(‘Hello world’). ���������� �������� ����� ����� ��, ��� � � int main() { prinf(‘Hello world’); }
     

  • 1.37, ����� (?), 16:15, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +1 +/
    �������� ��� PCI-E 5.0 16x ASIC ��� ����������� ���������� JS ��������
     
     
     
  • 3.80, ����� (?), 19:45, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    JS RTX ����� � 768-������ ����� ���������� ��� ������������ ����� Number � ����� �������� �������� Infinity.
     

  • 1.39, ����������� (?), 16:25, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +1 +/
    �� ���� ���������� ��������:�� ��� ���������,  �����������, � �� ����� ��� ���� ���������. �������� ��������� � ������ ��������.
     
  • 1.53, ������ (), 17:06, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • –1 +/
    >Codon �������� � �������������� ��������� �����������, ����������� ���������� ���������������� ����� �������, ��� ������ ������� ����� ��������� ����� ����������, ������������� ����������� � ����������� � ���� ������������ ��������� ��������������� ����������.

    �� ��� ������ ���� �� ������, ���� �� �� �������� ���������� Python �� SBCL � CMUCL.

     
  • 1.56, ������ (56), 17:14, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +/
    � ���-�� �������� Hello World Python/GTK4 ����� nuitka. � ����� ������� ������� � ���������� � ������ ��������� ���-�� ��� 60 ��. ���������� ���������� ��� �� ����� ����������� ������� MainWindow ���������� ���� ��� ������ ���� ��������� �� python, �������� ������� ����������. ������. ������ ���� ����?
     
     
  • 2.74, ������ (), 19:24, 27/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    ���� �������, ������ � ������ 6-�������� ������������� ����� ���������� ���������� �� ��������� � ����� ������������� ������������ :)
     
     
  • 3.95, ������ (95), 21:30, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +1 +/
    > ���� �������, ������ � ������ 6-�������� ������������� ����� ���������� ���������� �� ���������

    > � ����� ������������� ������������ :)

    ����� �������������� ����� �������� � ���������, �������������� � ����� � ��������� �����. 294, �� ��������?

     
     
  • 4.170, ������ (), 20:53, 29/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    > ������� ��������� � ������:

    ����, ������ �� — ���-�� �� �������� ��������� ���� ���������� ������ ����� ������ �����������.

     
     
  • 3.135, ������ (56), 04:59, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +1 +/
    Qt5/6 � GTK3 �������� �� ���������� ������. GTK4 ������, ���������� ���������� ������� �� ������ ��� ���. ���� libadwaita � CSS �������� ������� ��������. ���� ��� ����������� �������� ����������� GUI ������ ��� ������� �� gtk4 ��ң���.
     
  • 3.162, ������� ������̣� (?), 08:02, 29/12/2022 [^] [^^] [^^^] [��������]  
  • –2 +/
    � ���������� �� ����� �ݣ ������ ������� � ������� ������������� ������� — ��� ������� ������ �ݣ ����������� ������ )
     
  • 2.115, ������ (117), 23:57, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    ��-��, ��-��, ������� ����� ��������� �� ������������ ���������� �������������� ������.
     

     
  • 2.106, ������ (), 22:40, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    ������ ��� ��� ���� �����, ����� ������� �������� �� ������� ����� � ���� � ���������� �������.
     
  • 2.152, ������ (16), 21:06, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    �� ���������� ���� ������� ����� ������ ����� �� Modula-2 (�������: ����� ���������).
     

  • 1.64, ������ (64), 18:30, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +1 +/
    ���� ����������� ��������� ��������� �� �������� � ���� — ������ �������� �� ������ �ӣ �����.

    IMHO, ���� ������ ���������� ��� ��������� — GoLang. ��� �������, ��������� ����� ����������� � ���������� ����� �� ��� ������, ��� � C ��� �������.

     
     
  • 2.76, Skullnet (ok), 19:37, 27/12/2022 [^] [^^] [^^^] [��������]  
  • –3 +/
    > IMHO, ���� ������ ���������� ��� ��������� — GoLang.

    ��� �����, ������ ��� �� � ��� �� � ������ ���� type safety (� ������ ����, �� �� ��������), � � Go ������ ����� ������ «if err != nil» � ������ �������.

     
     
  • 3.91, ������ (), 20:47, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    �� ��� ������ ��� �� �������� ������ �� ������� �������� � ����. �� �� ����� �� �����-�� ���������, �� ������������ ����������, �������� � ��������� ������ ���������������, � ���� ��� ��������� ����?

    � ���������� — ��� ���? ���������� ���������? �������� ����� ������ ������� �� ��������� � ������ ������� � �������������� ������� ���-�� � ��������, � ����� ����� ��� ������������� ������.

     
     
  • 4.141, ������� (?), 09:18, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    �������� ������ ������, ��� �� � ���� ������ ����� ������ � ��������…

    ��� ��� ������������, �������, �� �� ������ �������������� �����������.
     
     
  • 5.157, ������ (), 23:44, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    > �������� ������ ������, ��� �� � ���� ������ ����� ������ � ��������…

    �� ���, �� ��������� ���� �����, ���������, � ������ �������������� ���������. ������� �������� �� ������� ��� ����� ��� �������� ����� ����� �������, �� �� ������ ��� ���� ����� � ������ �� �� ��� ��� ������������.

    > ��� ��� ������������, �������, �� �� ������ �������������� �����������.

    �� ��� ������ ��� � � ��� ����������. ���� �����-������ �������� �� ������� ��������, ��� �������� ������� ������� � ������ �������, �������.

     
  • 3.123, ����� (?), 02:00, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    > � Go ������ ����� ������ «if err != nil»

    ������ �� ������, �� ������ ������ ������ ������������ � ���� ���� � ������ � ��� �ӣ ������, �ӣ ������…

     
  • 2.87, BrainFucker (ok), 20:28, 27/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    > ���� ����������� ��������� ��������� �� �������� � ���� — ������ �������� �� ������ �ӣ �����.

    � Cython ����.

     
  • 2.96, ������ (96), 21:37, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    ��� ������ � ����� �������

    ������ ���������� ��� ���������, ���������� � «������» � ������ ������ AI  — Julia. ���� ���� ���������� ���������������� ��� ��� «������� ��������», �� �� ����� ���� ������ ��� ��� �������� ��������������� � ��� «��� �������» ����. ���� �� ������� ���������, �� ���� ��������.

     
     
  • 3.153, ������ (16), 21:11, 28/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    ���-�� ���� �� �����, ����� «������� AI — ������������� Python».
     
     
  • 4.158, ������ (96), 23:49, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/

    ���� �� �� ��� — ������� ������ ��� Python — ��� �� AI Python — ��� ��� AI … ������� ����� �ף����, ��������

     

  • 1.66, Skullnet (ok), 18:57, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • –1 +/
    �������� ������ ���������. ��� ����� �� ������� ����� m � �����, � n �� � ��� �����.
     
  • 1.79, ������ (79), 19:42, 27/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +/
    �������� ��, ��� � ����� ��������� ���. � ��� ��, ��������� �����-�� ���������, ������� ������������ � �������� �� ������….. ���� ������� ���?…..
     
     
  • 2.88, ������ (), 20:34, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +2 +/
    �������������� ������ ������� ��������� �� ������. ����� �� ������ �������������� ������ �� C?
     
     
  • 3.97, ������ (96), 21:44, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    ��� �����, ��� � ������� �������� � �����-�� � �� ����� ��������, � ���������� �� � � Fortran. � ����� — ������� ������ ���. ����� — ���� ����������, �� ���� ������� ���������� ����� ������� � ���� ���������, ���������� ���������� ���������� � ��������� ����������� ����, ��� ������ ��� �� � ���� � ������ ������� ������� �����.

    ����������� Fortran — ��� ����, �� ������� ����������, ������������ ���������� ������, ������������������ �� �������,  �����������, ����� ��������� � �.�. ���� ����� � ����� �� ����.

     
     
  • 4.99, ������ (12), 21:57, 27/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    ����� MKL ������ �� ���������, �� ������ ������, �� ���������� ���������. �� ���� � �������� �����, ������� ��� ����������� ��� � �£������ � ��� ����� ���.
     
     
  • 5.110, ������ (96), 23:00, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    �� � �����-�� ��. ���� Fortran IV � Fortran 77 ���� ������ ����� ����. �� ���� �� ��� ����� ���� ������ ������� ����� ��������, �� ������ MKL, � ����� ���� � ��� ����� � ������� ��������� ������� �������. �� �� ��������� � ��������, ������� � R,  Fortran �� ������� �� ������� ������� ������������ — ��� ������� �����.
     
  • 4.100, ������ (), 21:57, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/

    �� ���� ���������� ������ ������ �� ����� ��� �� 2016-�, � ����� 2023 ���� ���… ������� ����� �ף����, ��������

     
     
  • 5.108, ������ (), 22:43, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    >�� ����� ��� �� 2016-�, � ����� 2023.

    ������� ��� ��� 2021.

     
     
  • 6.111, ������ (79), 23:01, 27/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    Julia � 21-� ��� ���� ���� ������ �������� ������.
     
  • 1.118, Alladin (?), 00:51, 28/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • –2 +/
    ������ �������� ��� �� ����������� � �������������� ����� python? � �������� ������, � ������������ ��� ���������� � �������� ���? ����? ��������! ��� ���� � ����� ������������…
     
     
  • 2.120, ������ (120), 01:31, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    ����������� � �� ����������� ����� � �� ���������.
     
     
  • 3.121, ������ (120), 01:32, 28/12/2022 [^] [^^] [^^^] [��������]  
  • +/
    �� �� ���� ����� ���������������� �� ��������� — ����������� ������.
     
  • 2.126, ������ (12), 02:49, 28/12/2022 [^] [^^] [^^^] [��������]  
  • –1 +/
    �� ���� �� graalvm ���-�� ����������� � �������� ������ ��� ��. ������������ ���������� ��������� ������ ����������� ����� �����, ������� ����� ����������. ����� ����, ��� ������� � ��� ���� ��. ����������� ������� ����� ����, ��� � � ������ � �����, �� �� �������� ������������� �������.
     

  • 1.147, ��������� (ok), 14:35, 28/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • –1 +/
    �������� ������. ���� ������ �� ������������. ���� ����� ��������� � ����������� ����� � ASCII.
     
  • 1.154, ������ (16), 21:15, 28/12/2022 [��������] [﹢﹢﹢] [ · · · ]  
  • +1 +/
    ������, ���� ������� ��� ����������� �������������� ������� ���� ����������, �� �� ����� ���������� Cotton.
     

  • 1.186, AvengerAnubis (?), 17:10, 13/03/2023 [��������] [﹢﹢﹢] [ · · · ]  
  • +/
    �����, ������ �� ������� ����� ������ � ������������� ���������������������� ���������, ������� �� �������� �� (������) �������� �++. ����� ���������, ���������� ������� � ������� ��������� �������?
     

    High performance and no overhead! In a test I did, the performance gain was greater than 600%.


    Codon, a Python Compiler written with C++ and LLVM


    Codon is a high-performance Python compiler that compiles Python code to native machine code without any runtime overhead.

    The compiler was written with C++ and uses LLVM as the final assembly code optimizer. Unlike Python, Codon supports native multithreading, which can lead to even greater speedups.


    Installation

    You can compile Codon on your own machine, however there are precompiled binaries for Linux and macOS.

    In the case of Linux just run this command below:

    You must have cURL installed.

    /bin/bash -c "$(curl -fsSL https://exaloop.io/install.sh)"

    At the end of the installation it will ask you to confirm the addition of the binary to your $PATH variable, press y for yes. If it doesn’t work, even opening it in a new terminal, as he advises, run the following commands:

    echo 'export PATH=${HOME}/.codon/bin:${PATH}' >> ~/.bashrc
    exec $SHELL

    To test run:

    codon --version

    Usage

    Suppose you have this code Python which is a Fibonacci function, you can interpret the code with Codon itself:

    def fib(n):
        a, b = 0, 1
        while a < n:
            print(a, end=' ')
            a, b = b, a+b
        print()
    fib(1000)

    To run without compiling:

    codon run fib.py

    However, the performance will not be very good. The correct thing is to compile this code to a binary and then run the binary, example:

    codon build -release -exe fib.py
    ./fib

    You can still compile with [LLVM] optimization(https://terminalroot.com/tags#llvm)

    codon build -release -llvm fib.py
    ./fib

    Analyzing the performance

    When we used a for loop with 1 million cycles in Python, as we did in this video, Codon was about 600% faster than native interpreter (version 3.10.9).

    Test file/code can be obtained here.

    Result using /usr/bin/python

    time python main.py
    1000000Ok
    real   0m6,264s
    user   0m3,530s
    sys    0m2,415s

    That is, actual execution: more than 6 seconds. 😞

    Result using codon

    codon build -release -exe main.py
    time ./main
    1000000Ok
    real   0m0.795s
    user   0m0.254s
    sys    0m0,063s

    Actual execution: in less than 1 second!!! 😲


    Useful links

    • Codon official repository
    • Codon Documentation
    • To build/compile Codon from scratch

    python

    cpp

    llvm




  • Code blocks download for windows 10
  • Codex64 dll скачать для windows 10
  • Color picker for windows 10
  • Color laserjet pro mfp m176n драйвера для windows 10
  • Code 80072efe windows 7 update error