[Cython] Fwd: Re: [Speed] New benchmark suite for Python

2016-08-18 Thread Stefan Behnel
This could replace the benchmark runs that we had on Jenkins.

Stefan


 Forwarded Message 
Subject: Re: [Speed] New benchmark suite for Python
Date: Wed, 17 Aug 2016 23:47:29 -0500
From: Zachary Ware 
To: speed(AT)python.org

On Wed, Aug 17, 2016 at 7:37 PM, Victor Stinner wrote:
> PyPy, Pyston, Pyjion, Numba, etc. : Hey! it's now time to start to
> take a look at my project and test it ;-) Tell me what is broken, what
> is missing, and I will try to help you to move your project to this
> new benchmark suite!

Also, if you're interested in having your interpreter benchmarked on
speed.python.org, contact me with clear instructions (preferably in
the form of a shell or Python script) on how to build, test, install,
and invoke your interpreter from a fresh Ubuntu 16.04 installation.
As an example, here's an untested version for CPython 3.x:

#!/bin/sh
# set up dependencies
sudo apt-get build-dep -y python3
sudo apt-get install -y --no-install-recommends mercurial
# get the code
hg clone https://hg.python.org/cpython
cd cpython
# build
./configure --prefix=/opt/python/default
make -j12
# test
make buildbottest TESTOPTS=-j12
# install
make install
# invoke
/opt/python/default/bin/python3


I don't know when I'll have a chance to work on it, but I'd like to
get as many projects as possible benchmarked on speed.python.org.

Victor: Thanks for getting the new repository set up and for all your
work on the new runner!  I'm looking forward to trying it out.

-- 
Zach

___
Speed mailing list
https://mail.python.org/mailman/listinfo/speed

___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


[Cython] RFC: an inline_ function that dumps c/c++ code to the code emitter

2016-08-18 Thread Jason Newton
Accidentally posted to an already-opened tab for the cython-users ML
yesterday, moving to here. Following up from a github opened issue here:

https://github.com/cython/cython/issues/1440

I was hoping we could give a way to drop straight into C/C++ inside of
Cython pyx files.

Why?

-It [helps] avoid needing to declare every class/function in cython, a
somewhat daunting/impossible task that I think everyone hates.  Have you
libraries like Eigen or others that use complex template based techniques?
How about those with tons of [member] functions to boot or getting C++
inheritance involved.
-It works around having the Cython compiler know about all of C++'s nuances
- as an advanced C++ developer these are painful and it is a 2nd class
citizen to Cython's simpler C-support - that's no good.  Just right now I
was bitten by yet another template argument bug and it's clear C++ template
arguments have been kind of dicy since support appeared.
-It would allow single source files - I think this is important for runtime
compiled quasi-JIT/AOC fragments, like OpenCL/PyOpenCL/PyCUDA provide

The idea is that Cython glue makes the playing field for extracting data
easy, but that once it's extracted to a cdef variable for instance, cython
doesn't need to know what happens.  Maybe in a way sort of like the GCC asm
extension.  Hopefully simpler variable passing though.

The alternative to not having this construct is a concrete wall.  I'll have
to segment up files for C++ for the rest of time until I get function forms
that Cython can handle. At that point I just say screw it and use boost
python.  Of course cython does the definitions, data extraction, and
compilation so much easier than boost.python.  It would be a shame to not
consider this plight C++ developers have been cornered into and you can't
say the C++ libraries are broken, it is the strategy Cython is taking that
cannot work.

I did some examination of how this could be implemented - my idea was to
base on the print/exec statements handling and simply emit their arguments
from the Nodes to the code generator.  Proposing inline_c or inline_ as the
statement.  Such a statement could be used to do macros, pull in includes,
and modify/declare c-variables.

-Jason
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel