Date: Thu, 13 Feb 1997 16:44:21 -0800 (PST) From: Jake Hamby <hamby@aris.jpl.nasa.gov> To: Mikael Karpberg <karpen@ocean.campus.luth.se> Cc: hackers@freebsd.org Subject: Re: Sun Workshop compiler vs. GCC? Message-ID: <Pine.GSO.3.95.970213163633.10210D-100000@aris> In-Reply-To: <199702140004.BAA03489@ocean.campus.luth.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 14 Feb 1997, Mikael Karpberg wrote: > I seem to remember 4.2 autogenerating some kind of profiler info, so that if > you compile something, and just run it once, and then recompile, the compiler > will see what took most time, and go heavy on optimisations there. Neat > feature. Don't know how well it works, though... Waiting for it to pop > up in g++ too. Actually, the profiling info shows which functions call the other functions most often, and it is the LINKER that moves those functions closer to each other, ideally into the same page. That way the program has a smaller effective working set size, and is more likely to fit into the CPU cache. All of Sun's shared libraries are optimized this way. > Speaking of CC and g++... At work we use CC, and I'm getting fairly used > to templates, WORKING exceptions (WOW! Who ever heard of such a thing?), > and all the thread thingies, like mutexes, etc, default Just Working. > So... Does anyone know when g++ will handle this? Would be SO nice to have > at home too, for the pet projects. Last time I tried g++ on one of the > files written at work, it barfed even PARSING the throw clauses in the > function declaration. :( And catching a subclass with a catch clause for > a baseclass? Forget it... *sigh* I'd really like a status report on this. > > Also, does templates work as they should in g++ (Template database, or so)? > If not, what's the status on that? Hmm, I thought g++ was pretty good in this area. Codewarrior is particularly lousy in some of the newer areas, but they're improving (thinking of BeOS), but I'd never had trouble with g++, using the libg++ STL (which, come to think of it, has probably been hacked to work around some of g++'s weaknesses). At any rate, I stay FAR away from the newer areas of the C++ standard, so I'm not the person to ask. I do know that Sun claims to be tracking the standard very closely (the same with MS Visual C++), but Sun includes tools.h++ instead of the STL. But I believe the latest version of tools.h++ is _based on_ the STL, so I dunno. I'll have to try some of the examples from the STL Tutorial and Reference Guide and see if they work on CC, and if so, do they need to be linked with tools.h++? > Lastly... with 2.2-RELEASE and onward... will the libc_r be replacing the > standard libc, or what's the deal with that? I don't really understand > how one would handle two libcs. I agree that two libc's is pretty foolish. I want the regular C library to be thread-safe, although you'd probably have to define _REENTRANT to use some of the features (like the _r() and pthreads functions) when you compile to pick up the function prototypes. ------------------------------------------------------------------------------ |Jake Hamby| APT Engineer at JPL, CS student at Cal Poly, and BeOS developer!| ------------------------------------------------------------------------------ "Life is hard..."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.95.970213163633.10210D-100000>