On 12 May 2013 09:59, "Lisandro Dalcin" <dal...@gmail.com> wrote:
>
> I've also had problems with the switch optimization, but some <int>
> casting helped me to disable it:
> https://code.google.com/p/mpi4py/source/browse/src/MPI/commimpl.pxi#170
>
> I think Cython should have a compiler directive to disable this
> optimization. After all, enumeration values in C do not need to be
> different:
>
> $ cat enum.c
> enum { A=0, B=0, C=0 };
> $ gcc -Wall -c enum.c
> <no output>
Is this really even an optimization? Or well, I guess technically an optimization is something that produces identical behaviour so obviously it fails in that sense, but I mean, in what circumstance is it even faster? C compilers can trivially optimize a simple chain of integer comparisons.
-n


--
---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.