Anybody else tried FreeBasic (aka fbc)?

Christopher Browne cbbrowne-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Sat Oct 8 16:26:29 UTC 2005


On 10/8/05, Alex Beamish <talexb-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
>  I have successfully used Perl with multi-gigabyte files; it's an industrial
> strength solution. Only if speed is absolutely the highest priority should
> you need to go to hand optimized C code .. and I have lots of experience
> with C as well, it's lightning fast but can be slow to develop. Perl is
> almost as fast, but very quick to develop.

Reality tends to be that you can harness the [string libraries /
regexp libraries / other collection abstractions ] in other languages
and get comparable or better results than you'd get out of C.

String manipulation, for instance, is so painful to do in C that you
don't do sophisticated things with strings.

Allocating memory is similarly painful, meaning that you only do
dynamic allocation if you *REALLY* need to because of the complexity
and painfulness of debugging that results.

In contrast, consider that Perl has *highly tuned* libraries for
processing strings, regexes, and such, and allocating memory for data
structures doesn't require much thought.  It makes it entirely
possible that a Perl program where the major processing is actually
done by the regex portions might be FASTER than a hand-written C
alternative that doesn't harness as sophisticated a "string engine."

In practice, programs written in pretty well any language can pretty
easily saturate a 10 Base T link if you're talking to a web server and
doing "computational things."  (Database access changes the story
somewhat.)

It is not all that often where it is worthwhile doing the
optimizations that require resorting to [C|Assembly Language]; for any
of the higher level languages where significant optimization effort
has been done, such as Perl, Python, Scheme, Lisp, and such, the
*performance* benefits from using C are quite likely to be limited.

It is quite often likely for small tasks that "optimizing" by writing
in C (or C++) represents a premature optimization.

If you can more quickly jot an algorithm up in [Pick Dynamic Language
of Choice], you can figure out what is important to fix up
ALGORITHM-wise if you have to rewrite it in C.
--
http://www3.sympatico.ca/cbbrowne/linux.html
"The true  measure of a  man is how he treats  someone who can  do him
absolutely no good." -- Samuel Johnson, lexicographer (1709-1784)
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list