[CM] Performance of S7

Massimiliano Gubinelli m.gubinelli at gmail.com
Wed Dec 30 09:48:32 PST 2020


Hi,

> On 30. Dec 2020, at 15:34, bil at ccrma.stanford.edu <bil at ccrma.Stanford.EDU> wrote:
> 
> Thanks very much for the kind words about s7, and the comparison of s7 and Guile 1.8.
> I have wondered about real-world results -- I have my timing tests, and the standard
> benchmarks (which I think are not at all representative of actual code),
> and in those contexts, I believe s7 is faster than Guile 1.8.  I looked
> at some of the TeXmacs scheme code, and notice you use modules and hygienic
> macros.  The latter are not supported in s7, so I would expect the psyntax.pp
> implementation to be very slow.  

Thanks for the answer.

I'm not sure where you are looking but TeXmacs do not use hygenic macro, we use Guile standard define-macro macros, in very unhygenic ways :)

> I don't think 100,000 lines is a problem --
> s7test.scm has 104,000 lines, and runs in about a second, and I've loaded
> million line programs without problem.

Maybe then the problem is loading a lot of small files? 

>  Hash table lookups on symbols should
> be fast too, unless I've missed something.  Could you run TeXmacs under
> callgrind and send me the results? -- something might jump out at me.
> I downloaded TeXmacs, but I don't see the s7 code.
> 


I do  not know callgrind and I'm on Mac usually, does it work there?

Anyway I will try to extract some piece of the problematic code to make some further test or report them to this mailing list.

If you are curious you can find the TeXmacs/S7 code here:

https://github.com/mgubi/texmacs/tree/s7

it should work via the usual 

./configure ; make 

and then you can run without installing by calling

$TEXMACS_PATH=$PWD/TeXmacs TeXmacs/bin/texmacs.bin

from the src directory.

You will need Qt4.8, Freeype and Guile 1.8 (is not used but configure still looks for it). 

One function which is too slow is "menu-expand" at line 877 in this file:

https://github.com/mgubi/texmacs/blob/s7/src/TeXmacs/progs/kernel/gui/menu-widget.scm



Best
Max






More information about the Cmdist mailing list