Re: Why C?
- From: "Andrew Wilson" <bluemalov_NOSPAM_@xxxxxxxxxxx>
- Date: Fri, 11 Nov 2005 01:45:11 +0100
Horses for courses.
Memory and processing power are very cheap, especially when compared with
programming costs - i.e. one can always throw extra memory and processors
at
a problem much more effeciently and cheaply than throwing programmers at a
problem. As such programming effort should be reduced as much as possible
via planning and design.
Where I work our largest problem is not the language used (we use multiple
langagues on multiple platforms) but the amount of data stored in our
database and the response timed of the database servers.
As the database has grown we have found ourselves throwing extra
processors
and memory at the unix boxes anyway.
As someone who grew up on C (and has fond memories of it) I must admit
with
the amount of changes required to our system, the lack of proper planning
and design, and with 20 programmers working on varying aspects of the
system
C is definilty not an option for the main parts of the system (although it
does have its place).
As system complexity increases we need more and more modular frameworks -
Java and C# along with enterprise servers of various kinds, are a good
step
in that direction.
Having said that, I wouldn't think of writting a compiler, interpreter or
database server in anything other than C.
My pennies worth.
Andrew
"jacob navia" <jacob@xxxxxxxxxxxxxxxx> wrote in message
news:436d081d$0$1000$8fcfb975@xxxxxxxxxxxxxxxxxx
> Many people wonder why C is still being used to write
> GUI applications when so many alternatives exist, that
> are proclaimed "better" by the "experts".
>
> Here are some points that could be interesting to know
> when planning a new application.
>
> Let's compare two applications then, one written in C,
> the other in Visual Basic dot net.
>
> The Visual Basic application is a "notepad" clone, but
> missing some features like "Find". It will load and
> display a text file in a window.
>
> The C application is the IDE of lcc-win32: it features also
> a text display, but contains a debugger, a project management
> module, code analysis, software metrics, regular expression search,
> and a very long ETC that would be too long to enumerate here.
>
> Test part 1: Loading the application into memory. No files open.
> Memory footprint.
> vb.net: 24 284 Kb
> wedit: 12 060 Kb
>
> With all the features, the C application uses 50% of the memory
> footprint of the VB application. I thought at first that this
> would be the overhead for loading the first vb.net application and
> that following applications would need less memory but no, that
> is not the case. A second vb.net notepad uses also 24MB.
>
> Test part2: Loading a file of 376 879 bytes.
> vb.net 31 548K
> wedit 17 316K
>
> The vb application needs 7 264 Kb to hold the file, wedit needs
> 5 256. This is a lot of overhead still, but wedit needs only 1MB
> more to store a second file of the same size.
> This means that a lot of it is the overhead of loading
> the first file. This comparison is not possible with the vb
> application since it can hold only one file at a time.
>
> Test part3: Opening the "about" dialog box.
> vb.net: 32 480K
> wedit: 17 280K
>
> Just to show a simple "About" dialog box, the vb.net
> application uses almost a megabyte more of memory. The
> memory consumption of wedit goes DOWN slightly since a
> garbage collection happens. Both applications use a
> garbage collector.
>
> The numbers speak by themselves.
>
> jacob
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 24183 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!
.
- References:
- Why C?
- From: jacob navia
- Why C?
- Prev by Date: Re: Why C?
- Next by Date: ISAPI Extention
- Previous by thread: Re: Why C?
- Next by thread: ISAPI Extention
- Index(es):
Relevant Pages
|
|