Scripting language choice for initial performance

I have a small lightweight application that is used as part of a larger solution. Currently it is written in C but I am looking to rewrite it using a cross-platform scripting language. The solution needs to run on Windows, Linux, Solaris, AIX and HP-UX.

The existing C application works fine but I want to have a single script I can maintain for all platforms. At the same time, I do not want to lose a lot of performance but am willing to lose some.

Startup cost of the script is very important. This script can be called anywhere from every minute to many times per second. As a consequence, keeping it's memory and startup time low are important.

So basically I'm looking for the best scripting languages that is:

  • Cross platform.
  • Capable of XML parsing and HTTP Posts.
  • Low memory and low startup time.

Possible choices include but are not limited to: bash/ksh + curl, Perl, Python and Ruby. What would you recommend for this type of a scenario?

Answers


Because of your requirement for fast startup time and a calling frequency greater than 1Hz I'd recommend either staying with C and figuring out how to make it portable (not always as easy as a few ifdefs) or exploring the possibility of turning it into a service daemon that is always running. Of course this depends on how

Python can have lower startup times if you compile the module and run the .pyc file, but it is still generally considered slow. Perl, in my experience, in the fastest of the scripting languages so you might have good luck with a perl daemon.

You could also look at cross platform frameworks like gtk, wxWidgets and Qt. While they are targeted at GUIs they do have low level cross platform data types and network libraries that could make the job of using a fast C based application easier.


Lua is a scripting language that meets your criteria. It's certainly the fastest and lowest memory scripting language available.


Need Your Help

Implementing pipe in java, the second program does not output in time (ping | grep)

java pipe

I'm writing an IRC bot which can execute several commands and output the result to IRC channel. These commands are connected using pipe which is implemented in java.

acceleoCompiler not showing output in console output with ant

eclipse ant eclipse-emf acceleo

I am using acceleoCompiler inside an ant script and when i run the ant script everything shows an output except acceleoCompiler.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.