Jump to content

lua performance question

- - - - -

  • Please log in to reply
4 replies to this topic

#1
TCristoforo

TCristoforo

    Learning Programmer

  • Members
  • PipPipPip
  • 52 posts
I'm working on a project where I'm reading a binary formatted file and extracting the data in it to form more coherent information that is useful to the program I'm making.

I'm wondering if there are any performance gains(other than ease of editing the script) if I were read in and extract the data from a lua file instead.

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
C will be faster than Lua, but if you are reading small binary files it does not actually matter.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
TCristoforo

TCristoforo

    Learning Programmer

  • Members
  • PipPipPip
  • 52 posts
Thanks, what size binary file would you consider to be 'too large' where it would start to make a performance difference?

512 bytes?
1K?
5K?

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
I was thinking 50MiB+, You should not then worry about files that size, C is faster but loading those files and processing them takes a negligible amount of time in the first place for either, Lua may be easier to write with in the end.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#5
TCristoforo

TCristoforo

    Learning Programmer

  • Members
  • PipPipPip
  • 52 posts
I figured as much, thanks for the info :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users