Hello Robert,

>> there wasn't much else I could try. so is that all?
>
> In general, there aren't dozens of knobs to twiddle like there are
> with most compilers.
>
> There are a couple of directives at
> http://wiki.cython.org/enhancements/compilerdirectives that might make
> a difference.

Ah my bad, I searched for "Options". Might be a good idea to make these 
a bit more prominent.

> For example, setting boundscheck and wraparound to False
> will make things faster (removing the checks for negative and
> out-of-bounds access of course), and infer_types=True (again, this
> creates semantic changes, as integer literals will be inferred to be C
> ints and thus might overflow). And I'd imagine that 0.13 will be an
> improvement over 0.12, at least for some things.

Thanks for the pointers, I believe I will use these sets then:

compatability:
infer_types = True   # speed
nonecheck = True     # CPython compatability
wraparound = True    # CPython compatability
boundscheck = True   # CPython compatability
cdivision = True     # CPython compatability

speed:
infer_types = True
nonecheck = False
wraparound = False
boundscheck = False
cdivision = False


  >> And then what to use for gcc (the C/C++ compiler of choice or is any
>> other working for you better on Linux), simply -O3 and be done with it?
>
> That's all I do, but there's a lot of options to try, so it'd be
> interesting to see if any make a noticeable impact. (Same with
> comparing various compilers.)

I will play around for sure.

>> Or is there any experience indicating that some special options will
>> give measurable improvements?
>>
>> Obviously I would like to first use the correct options and only then
>> publish results. So please let me know. :-)
>
> It should be noted that most of the effort has gone into making
> *annotated* code fast, as most users care more about a 100x speedup
> with a little bit of work than a 2x speedup for free.

I will always make that clear when posting results, Robert. I am a 
minority. Using the above option set "compatability" indicates that already.

I am not not against annotations at all, I just believe they should be 
in Python and ideally do a check in Python too. And initially I want to 
stretch the borders of what's possible with automatic type inference or 
guessing.

Thanks for this, I will come back with results then. I will include 2 
sets of cython directives, aggressive and compatability and see how far 
I get with that.

Yours,
Kay
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to