in reply to Preferred language for scheduler assignment?

Given that Priority Queues (heaps) are implemented by Heap::Simple, and Heap, the queuing portion of the task is mostly implemented for you already. You just have to handle the logic where order is only adjusted when something takes longer, but not when it takes shorter.

Reading in the flat files and splitting them into individual elements is also one of those things that Perl does easily.

And the Benchmark module, or Time::HiRes may be what you need for timing the execution of each entity.

So Perl definately provides the building blocks to you, through CPAN as well as built-in functionality. It starts you off a little further down the development road than C, for example, for a project like this.

That means that in programming efficiency, Perl is going to beat C on this particular type of project. But that doesn't mean it will be the winner based on execution speed. If raw speed is the goal, dust off your assembler and start bit-fiddling.

In amount of code, Perl is probably going to come out ahead; you're going to end up typing fewer lines of Perl to accomplish this than lines of C, especially since some of the groundwork is already done and available on CPAN.

As far as development efficiency, yes, Perl is starting you out further down the road toward "done", but if you don't know Perl, you have to also consider the learning curve.


Dave

  • Comment on Re: Preferred language for scheduler assignment?

Replies are listed 'Best First'.
Re^2: Preferred language for scheduler assignment?
by jfroebe (Parson) on Nov 19, 2004 at 17:13 UTC

    Given that Priority Queues (heaps) are implemented by Heap::Simple, and Heap, the queuing portion of the task is mostly implemented for you already.

    The way I read the assignment, the instructor is looking for the students to create their own priority queue. The OP should run using Heap::* by the instructor to make sure that it is okay for the class. There is no point in using it if it will hurt the OP's grade.

    Jason L. Froebe

    Team Sybase member

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1