[Gambas-devel] About gb.adt (2)

Tobias Boege tobias at ...692...
Sat Aug 25 00:51:02 CEST 2012


On Fri, 24 Aug 2012, Emil Lenngren wrote:
> I agree on load time for C++ libraries.
> 
> Have you looked at the source code for std::set? Try to make a faster tree
> ;)
> The really slow code in libstdc++ are the i/o-routines, iostream, fstream
> etc. I see no reason to use them at all. But the datastructures and
> algorithms are fast.
> 
> It is always possible to "borrow" code from libstdc++ too, as it is GPL.
> 
> /Emil
> 
> 2012/8/24 Beno?t Minisini <gambas at ...1...>
> 
> > Le 24/08/2012 16:55, Beno?t Minisini a ?crit :
> > > Le 24/08/2012 16:01, Emil Lenngren a ?crit :
> > >> Haha. I will not force you. But what's the problem? Everybody has
> > >> libstdc++ on their computer. Many other components like gb.qt4,
> > >> gb.image.effect depend on libstdc++.
> > >>
> > >> /Emil
> > >>
> > >
> > > It eats memory. It takes times to load. Other libraries uses libstdc++,
> > > but it is not an argument.
> > >
> > > If Tobiad or anyone else finds funny to implement that, like Adrien did
> > > with its XML component, (and if the result works of course), then go!
> > >
> > > And who said that libstdc++ is optimized? I'm suspicious.
> > >
> > > The Gambas compiler is twice faster in Gambas 3 than in Gambas 2 mainly
> > > because I stopped using the libc standard file routines.
> > >
> > > 10% of Gambas IDE startup time is spent in a Xlib routine that reads a
> > > X11 compose key configuration file - it reads each file character twice
> > > by using getc()!
> > >
> > > So you can see why I'm *always* suspicious with libraries...
> > >
> > > Ha, and C++ is awful. :-)
> > >
> >
> > Another point: gb.image.effect use C++ because it is actually code taken
> > from KDE3. But it could be rewritten entirely in C, it has only static
> > functions modifying an image buffer.
> >
> > Regards,
> >
> > --
> > Beno?t Minisini
> >

I always look for possible implementations out there. Libstdc++ is only one
and the Linux kernel has rbtrees, too. I just don't know yet, how they both
do it.

I myself will not use C++. It begins for me when compiling a "hello world"
sample and the compiler runs about just as long as it needs to make me think
"what the hell can take that long? Grr." ;-)
No, seriously: I really won't use it but if someone comes up with a more
efficient implementation in C++ (or whatever), we should really use this one
until we improved the C version. :-)

Regards,
Tobi





More information about the Devel mailing list