[tex-live] Comments on asy in the x86_64 2017 pretest binary

Mojca Miklavec mojca.miklavec.lists at gmail.com
Wed May 24 09:11:16 CEST 2017

On 24 May 2017 at 05:28, Ken Moffat wrote:
> When I posted a couple of days ago about my problem with lua in 2017
> source (caused by gcc-7.1), I mentioned that I might comment more on
> the binary asy if I managed to rebuild it (and the main texlive) from
> source.
> The reason is that 3D drawing/diagrams in asy seems exceptionally
> slow in the binary.
> Using the attached file (it produces a pink cylinder - not very
> exciting) I run:
> pdflatex cylinder.tex
> asy -V cylinder-*.asy
> pdflatex cylinder.tex
> pdflatex cylinder.tex
> At the moment I'm on an intel haswell i7 ticking along at about 3.6
> GHz.  With the binary, and my Makefile to run those commands as
> 'make cylinder', it takes between 47 and 48 seconds.  With the
> self-compiled version of asymptote it takes just over 13 seconds.
> 2D drawing does not seem to be impacted.  I see that my own build
> of asymptote used the following flags in g++ : -Wall -DHAVE_CONFIG_H
> -std=c++11 -g -O3 -fno-var-tracking
> Also, I throw a lot of system deps at this: gc, fftw, gsl, freeglut,
> even libsigsegv.

I don't know about the linux binary in particular. Mac binaries are
compiled with gc, fftw, gsl statically, but no freeglut or libsigsegv.
Most binaries are probably only compiled with gc and potentially some
system opengl libraries.

> I then rebuild Python so it can pick up tk, then
> build its Imaging module - but from memory that only lets me try to
> use xasy, and like so many things I have not yet acquired the knack
> of doing anything useful with that.

Yes, Python and Tk are only useful for xasy.

> But although the extra asymptote deps are clearly not essential, it
> does seem to run a lot faster if they are present.

Would you be willing to try to recompile asymptote without some of
those dependencies and check whether that's indeed the case? It's
quite possible that slower runtime is caused by asymptote being
compiled with an ancient non-C++11 compiler.

It would be helpful to figure out the *exact* cause of the slow
binaries. We had problems with slow i386-linux luatex (factor of 2) a
few weeks ago which turned out to be related to some optimisation
flags only.

I assume you are on Linux?

> Perhaps they
> might be reconsidered if texlive moves to a newer c++ standard for
> 2018 ?

Optional libraries for asy are usually not included because it's an
extra hassle to fetch and compile all the dependencies statically
first and each person compiling has to go through the trouble of
repeating those same steps over and over again. If we provide a single
command to do all the work, it's more likely that the libraries will
be included over a wider spectrum of supported platforms.

I wrote a bunch of scripts to compile asy with a bunch of static
libraries, but the scripts would need slightly more work to be more
generally usable over a wider spectrum of platforms.

Going to C++11 will be a "fun experience", leaving many older platforms behind.


More information about the tex-live mailing list