Hi Janek, thanks for pybind feedback. It is intriguing. It was definitely after me mentionning compile times with boost for c++ / python, at a workshop, that someone reached me and advised about pybind. Rumor?
Bruno Le dim. 23 févr. 2020 16:03, Janek Kozicki (yade) <jkozicki-y...@pg.edu.pl> a écrit : > > Another note: I just realized that the compilation benchmarks might > > have not been fair, because I think that I added few more > > registrations (like Vector2c, or sth. like that) while doing pybind > > migration. I will compare again without these extra registrations. > > OK, I have compared with the exact same registrations. And it seems > that pybind has many advantages, but not the one that it is compiling > faster. See: > > pybind without debug info; call `ccache --clear` between every invocation. > -O3 -j 1 -O3 -j 10 > wall clock time: 2:41.14 wall clock time: 0:40.67 > wall clock time: 2:46.56 wall clock time: 0:41.28 > wall clock time: 2:47.42 wall clock time: 0:42.54 > wall clock time: 2:43.79 wall clock time: 0:44.70 > > -O1 -j 1 -O1 -j 10 > wall clock time: 2:09.88 wall clock time: 0:35.00 > wall clock time: 2:10.78 wall clock time: 0:33.46 > wall clock time: 2:08.19 wall clock time: 0:32.62 > wall clock time: 2:10.10 wall clock time: 0:32.73 > > > ================================================================================ > boost::python without debug info; call `ccache --clear` between every > invocation. > -O3 -j 1 -O3 -j 10 > wall clock time: 2:16.83 wall clock time: 0:33.88 > wall clock time: 2:15.96 wall clock time: 0:32.84 > wall clock time: 2:16.00 wall clock time: 0:34.85 > wall clock time: 2:16.52 wall clock time: 0:32.32 > > -O1 -j 1 -O1 -j 10 > wall clock time: 2:01.48 wall clock time: 0:28.56 > wall clock time: 2:00.70 wall clock time: 0:29.15 > wall clock time: 2:01.29 wall clock time: 0:28.05 > wall clock time: 2:00.56 wall clock time: 0:28.35 > > The main pybind disadvantage is unstable API. I don't like writing > extra code to support older linux distributions. > > > Also I think that if while copying minieigen into yade we did some > extra rebalancing between the .cpp files, so that in each file there's > about the same amount of registrations performed, then we could > reduce (parallel) compilation time to maybe 25 or 20 seconds. > > > If you wanted to compile and try yourself, the comparison was between > branches master and tryPybind. To see how to compile see .gitlab-ci.yml, > I'm sorry that it's a bit messy. I was never good at using build > systems ;) I just wanted parallel build quickly. That's why I wrote > such strange makefile. > > best regards > Janek > > > > > Another comparison note: > > > > 8. boost::python is much more picky about the order of registered > > functions, and sometimes does not work if the order is "wrong". > > pybind always resolves the function overloads correctly. > > -- > -- > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof. > Gdańsk University of Technology > Faculty of Applied Physics and Mathematics > Department of Theoretical Physics and Quantum Information > -- > http://yade-dem.org/ > http://pg.edu.pl/jkozicki (click English flag on top right) > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-dev > Post to : email@example.com > Unsubscribe : https://launchpad.net/~yade-dev > More help : https://help.launchpad.net/ListHelp > > >
_______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : firstname.lastname@example.org Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp