How can I measure or is there a concrete proof, which out of node.js and perl is better for text parsing
Asked
Active
Viewed 1,364 times
-3
-
1Answer: Whichever one you know better. – SLaks Dec 17 '12 at 16:23
-
1@SLaks - I know both and I would prefer node.js but i dont want to be biased – attaboyabhipro Dec 17 '12 at 16:27
-
@TLP - Better would mean faster time. Time would take preference over space. Also, file IO would be done as the text is in persistent memory. The text files are present in various directories like n ary tree of depth 3 (max). I would like to push the data parsed into a database (noSQL or RDBMS) – attaboyabhipro Dec 17 '12 at 16:32
-
@AbhisheshSharma That would depend on the type of parsing you do. You can probably optimise in a number of different ways as well. In the end, the only true test is trying it out for yourself. – TLP Dec 17 '12 at 17:00
-
Keep in mind that simple file operations are way more complex in Node.js than in Perl. Have a look at how many answers [Read a file one line at a time in node.js](http://stackoverflow.com/questions/6156501/read-a-file-one-line-at-a-time-in-node-js) has. And still, none of them really lets you stop reading after a certain number of lines and resume it on demand. – Dan Dascalescu May 13 '13 at 01:43
1 Answers
2
you write a script in each, parsing some text and take the timestamp before - the timestamp after finishing the execution.

Theolodis
- 4,977
- 3
- 34
- 53