lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Thursday, January 16, 2014, Joseph Manning <manning@cs.ucc.ie> wrote:
On 2014-Jan-16 (Thu) at 06:44 (-0600), Andrew Starks wrote:

>> Lua seemed like stupid, slow C to him then. Now, a good day involves
>> deleting hundreds of line of C and replacing it with Lua. The line count is
>> usually about a third.

Andrew,

   Perhaps drifting somewhat OT regarding BASIC, but doing line-counts
   for text-based file managers gave the following [1] :

      Name                Language  Files  Lines
      ----                --------  -----  ------
      FDclone                 C      102   94,586
      Midnight Commander      C      325   92,228
      vfu                     C       56   14,948
      ytree                   C       58   13,970
      vifm                    C       40    9,010
      CFM                    Lua       1      718

   CFM, written in Lua, has 14 times fewer lines than the next smallest,
   and 132 times fewer lines than the largest.

   Granted, it's a bit apples-and-oranges here, as CFM lacks many of the
   ( rarely-used? ) features of some of the others, but it does manage
   to provide all(?) the core functionality expected in a file manager.

   [1] http://www.lua.org/wshop13.html#Manning

Joseph

------------------------------------------------------------------------
Joseph Manning / Computer Science / UCC Cork Ireland / manning@cs.ucc.ie
------------------------------------------------------------------------


In our case, a re-imagining of the architecture is also taking place. 

This is the reason that speed comparison are useless. In our case, lua is infinity faster than c++, because we lack the army of engineers required to make the comprehensible and stable version of what we've been able to accomplish so far, using the former. 

I shouldn't have mentioned the lines of code statistic, in my anecdote. Your study looks more believable. 

-Andrew