Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

LUA is FFOC

Name: Anonymous 2011-02-05 9:01

LUA is the toy language for those who enjoy the Forced Flushing Of L1/L2 Cache per operation. In fact, every operation causes several L2 cache misses during table look-ups, flushing both the L1 and L2 caches.

http://www.slideshare.net/hughreynolds/optimizing-lua-for-consoles-allen-murphy-microsoft

Enjoy your FFOC.

Name: Anonymous 2011-09-24 17:18

>>144
I'm surprised Lua doesn't have some form of typed defstruct as well.

Name: Anonymous 2011-09-24 17:31

>>145

yeah me too. I'm sure developers using it in games would really appreciate it. It wouldn't require very much deviation from the language either, in fact, it might be implementable as is with some crazy hacks. Because nothing can actually be stored within a struct, just references to other values, a struct with n fields of arbitrary types can be implemented as a lua table using only the indecies, 1 .. n as keys. Doing this would ensure that it would look like a regular array under the hood. Then you could have table mapping field names to positions within the array:


apple_struct_field_locations = {num_seeds = 1,
                                color = 2,
                                age = 3}


and then, somehow have lua locate every point in your code where an apple_struct is being indexed by one of the three constant keys above, and inline replace it:


apple_struct.num_seeds = 2
   ->
apple_struct[apple_struct_file_locations['num_seeds']] = 2
   ->
apple_struct[1] = 2


I can't think of a way to get this, other lisp style macros though.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List