POV-Ray : Newsgroups : povray.off-topic : Emacs : Re: Emacs Server Time
30 Sep 2024 22:15:13 EDT (-0400)
  Re: Emacs  
From: nemesis
Date: 21 Apr 2009 23:53:16
Message: <49ee94ac@news.povray.org>
Darren New wrote:
> Darren New wrote:
>> nemesis wrote:
>>> It is very difficult to write compilers that generate optimized 
>>> native code as good as the ones already provided by mature C 
>>> compilers that have been around for ages.
>>
>> It depends on the language, of course. 
> 
> Here's a good example. Your CPU supports both decimal arithmetic and 
> CISC-style opcodes that check array bounds and multiple-dimension-array 
> calculations.  Like, say, the VAX.  You want to implement Ada, which 
> supports both array bounds checking for multiple-dimension arrays and 
> decimal arithmetic.  Those features probably won't be fast if you 
> generate portable C
/snip/
> Ada also supports natively threads and interrupt handling, neither of 
> which you can generate C to handle. So some languages simply cannot be 
> translated to C in any sort of portable way.

True.  Arrays in Scheme (vectors) are bounds checked.  Probably won't 
run all that nice on VAX but at least will run, something that possibly 
wouldn't happen at all if one was to support optimized native code 
generation for all platforms under the sun out there.  There were crazy 
enough people to do that in the past:  C compiler writers. :)  We just 
reap the benefits...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.