[CM] Performance of S7

Massimiliano Gubinelli m.gubinelli at gmail.com
Thu Dec 31 03:20:56 PST 2020


Ok, I've got some clue.

In TeXmacs we have a system to define "global" functions which is implemented via a macro "tm-define". If I run a stadard (fib 40) benchmark then it takes 2-3 sec, but if I define the fibonacci funciton via tm-define then it takes 20 sec! This could account for the sluggish performance since essentially all the core functionality is implemented via tm-defines... 

Any suggestions to make it faster, or why it is so slow? In the very basic case tm-define just make a define in a let environment which is visible in all modules (see TeXmacs/progs/kernel/boot-s7.scm for the definition of the module system and TeXmacs/progs/texmacs/tm-define.scm for the definition of tm-define)

Best,
Max



> On 31. Dec 2020, at 11:23, Massimiliano Gubinelli <m.gubinelli at gmail.com> wrote:
> 
> I'm very surprised too, I've run some of the standard benchmarks on my machine and so far s7 is either on par with Guile 1.8 or much better. 
> 
> It could be some problem in the way I embed it? Or the fact that I load all the code in a sublet of the rootlet? (I implemented on S7 a module system similar to that that Guile has)
> 
> I will try to run some of the benchmarks inside the embedded S7 to see if the situation is different there.
> 
> Thanks for the help, anyway. 
> 
> Max
> 
> 
>> On 31. Dec 2020, at 01:21, bil at ccrma.stanford.edu <bil at ccrma.Stanford.EDU> wrote:
>> 
>>> Does this tell you something?
>> 
>> Those functions should not be taking any time at all.  I'll
>> have to try to build TeXmacs and take a look at this.
>> I might not get around to it until sometime next week.
>> 
> 




More information about the Cmdist mailing list