fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Again on "Compile time constant lookup tables"


From: Carlo Bramini
Subject: Re: [fluid-dev] Again on "Compile time constant lookup tables"
Date: Tue, 18 Sep 2018 22:23:47 +0200 (CEST)

Hello!

well, I did some experiments with the solution using Python interpreter.
It is not so bad afterall.
I have not code duplication here because the C implementation for calculating 
the tables is gone. Actually, in this solution, there is no need to keep it, 
unless an "hybrid" code is wanted and you want to build Fluidsynth without 
using Python.
The C code just include the generated header and nothing else, although I did 
it only for fluid_rvoice_dsp.c, probably it won't be much different in other 
places.
Changing the size of the tables will happen only in the python scripts, because 
into the C code you can get those sizes by using sizeof().
Perhaps it could also be an alternative to evaluate.

Another alternative could be to reject all the solutions and keep current code: 
they are simple and fast calculations for a decent hardware, I found that there 
are some look up tables that never change when the synthesizer is running and I 
felt the challange to find a solution for calculating them in some way at 
compile time, but actually it not the most important task.

Sincerely.

> Il 18 settembre 2018 alle 20.48 "Tom M." <address@hidden> ha scritto:
> 
> > the need to save a few KB of RAM is very rare indeed.
> 
> Yet, I would prefer if upstream takes care of this topic. I dont want to push 
> responsibility to someone else.
> 
> Also, I prefer Carlo's C tool as it allows to use fluidsynths internal 
> calculation routines to generate the constexpr tables. Whereas a python 
> script would probably duplicate the existing implementation.
> 
> I see the following two solutions:
> 
> 1) Use the Preprocessor (#423)
> 
> *   fully automatic C90 compliant approach
> 
> *   huge memory requirements during compilation (>2GiB)
> *   doesnt work for all lookup tables
> *   MSVC wont work at all
> 
> 2) Generate tables once and version control them
> 
> *   works for everone
> *   works for all lookup tables
> 
> *   slighly more maintaining effort
> *   "pollutes" the repository if tables are ever to change (highly unlikely 
> though)
> 
> Opinions? Votes?
> 
> Tom
> 
> _______________________________________________
> fluid-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fluid-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]