[PATCH RFC] RFC: allow optional C++ 11 extensions with pybind11 for performance code

Augie Fackler raf at durin42.com
Tue Feb 9 20:09:46 UTC 2016


On Mon, Feb 08, 2016 at 05:49:47PM -0800, Sean Farley wrote:
>
> Durham Goode <durham at fb.com> writes:
>
> > That said, it's totally possible that C++ isn't an appropriate cross
> > platform solution for even linux+osx+windows.  I'm relying on the
> > experience of members of the community to determine the sanity of this idea.
>
> If you have never had to support cross-platform C++, or even libc++ vs
> libstdc++, then I envy you. It is a headache no on should have to deal
> with.
>
> As I mentioned before, why not try cffi with standard C? This route will
> open the door for pypy as well as a portable shared library.

I mentioned this in another reply on the thread, but I'll bring it up
here: "standard C" is such a tiny collection of standard features that
if you want me to take this proposal seriously, you need to start
talking about what the data structures story is going to be for things
that I get for free pretty much anywhere else: maps, lists, sets,
etc. lazymanifest was about the upper end of what I'm willing to spend
time on in C[0], and I know there's more work we could be doing in
native code for some nice performance wins.

I make no claim that C++ is going to be easy on all platforms, but my
strong suspicion is that on the platforms where we have serious users
it'll be relatively straightforward.

AF

0: If I'd known lazymanifest was going to take as long as it did, I
probably wouldn't have done it. I consider myself pretty comfortable
with C, so I think there's a real barrier-to-contribution present from
our continued use of C89 for native speedups.

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list