Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Using Python for programming algorithms

Reply
Thread Tools

Using Python for programming algorithms

 
 
sturlamolden
Guest
Posts: n/a
 
      05-21-2008
On May 21, 11:59 am, Bruno Desthuilliers <bruno.
(E-Mail Removed)> wrote:

> Strange enough, no one calls Java or C# 'interpreted languages', while
> they (or, to be more exact, their reference implementations) both use
> the same byte-code/VM scheme[1].


Java interprets the bytecode in a virtual machine by default. Only
code 'hotspots' are JIT compiled to native machine code.
Microsoft .NET compiles bytecode to native code on the first
invocation, and caches the machine code for later use. Nothing is
interpreted.

Java can benefit from more runtime information when generating machine
code, but incurs the penalty from running an interpreter most of the
time. MS .NET is more similar to a static compiler. They currently
perform about equally well, sometimes approximating traditional
compiled languages like C++.

But they do not use the same bytecode VM scheme. Particularly,
Microsoft .NET has no virtual machine.

> You know, Common Lisp is also an highly dynamic language, and there are
> now some optimizing native-code Common Lisp compilers that generate very
> efficient binary code. It only tooks about 30 years and way more
> ressources than CPython ever had to get there...


The speed of Common Lisp with compilers like SBCL and CMUCL comes from
optional static typing. This no more magical than what Cython and
Pyrex already can do. If we remove the interpreter when Cython or
Pyrex supports all features of the Python language, and instead rely
on "JIT compilation" by one oth these compilers, we are already there.




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions on Using Python to Teach Data Structures and Algorithms efrat Python 14 11-09-2007 03:36 AM
Programming algorithms with strings in C++, and transition from C by example! CoreyWhite C++ 4 03-31-2007 03:40 AM
Programming algorithms with strings in C++, and transition from C by example! CoreyWhite C Programming 5 03-31-2007 03:40 AM
Questions on Using Python to Teach Data Structures and Algorithms efrat Python 2 09-28-2006 11:42 AM
ANN: pygene0.12 - Genetic Programming&Algorithms Library aum Python 1 12-11-2005 07:35 PM



Advertisments