LuaSrcDiet: Puts your Lua 5.1 source code on a diet Version 0.12.1 (20120407) Copyright (c) 2012 Kein-Hong Man The COPYRIGHT file describes the conditions under which this software may be distributed. *** global variable list (sorted by size) *** -------------------------------------------- Token Input Input Global Count Bytes Average Name -------------------------------------------- 7 42 6.00 module 4 20 5.00 error 5 20 4.00 init 2 18 9.00 errorline 2 16 8.00 post_lex 2 16 8.00 optimize 2 14 7.00 chunkid 2 14 7.00 seminfo 1 10 10.00 post_parse 2 10 5.00 tokln 3 9 3.00 tok 1 9 9.00 post_load 2 8 4.00 warn 1 8 8.00 _VERSION 1 7 7.00 package 1 7 7.00 require 1 6 6.00 binary 1 6 6.00 source 1 6 6.00 string 1 6 6.00 parser 1 5 5.00 table 1 5 5.00 print 1 4 4.00 math 2 4 2.00 io 1 4 4.00 llex 2 4 2.00 _G 1 2 2.00 os -------------------------------------------- 51 280 5.49 TOTAL -------------------------------------------- *** local variable list (sorted by allocation order) *** ---------------------------------------------------------------------- Decl. Token Input Input Output Output Global Count Count Bytes Average Bytes Average Name ---------------------------------------------------------------------- 204 997 3188 3.20 997 1.00 e 179 907 2212 2.44 907 1.00 n 141 614 1958 3.19 614 1.00 l 79 394 1339 3.40 394 1.00 o 55 272 1444 5.31 272 1.00 t 44 237 1048 4.42 237 1.00 a 36 179 826 4.61 179 1.00 i 35 165 920 5.58 165 1.00 r 28 129 714 5.53 129 1.00 c 16 87 534 6.14 87 1.00 d 18 82 631 7.70 82 1.00 f 22 98 487 4.97 98 1.00 s 16 68 475 6.99 68 1.00 u 13 56 516 9.21 56 1.00 h 14 56 380 6.79 56 1.00 p 12 54 482 8.93 54 1.00 T 11 45 341 7.58 45 1.00 m 7 28 203 7.25 28 1.00 b 11 42 341 8.12 42 1.00 _ 6 26 238 9.15 26 1.00 E 5 22 137 6.23 22 1.00 K 6 25 234 9.36 25 1.00 L 6 25 192 7.68 25 1.00 O 6 24 227 9.46 24 1.00 k 5 19 121 6.37 19 1.00 g 6 20 163 8.15 20 1.00 I 6 20 205 10.25 20 1.00 N 5 16 122 7.62 16 1.00 v 6 20 183 9.15 20 1.00 A 5 16 150 9.38 16 1.00 w 5 15 120 8.00 15 1.00 S 5 13 148 11.38 13 1.00 x 5 13 104 8.00 13 1.00 R 3 9 88 9.78 9 1.00 y 3 9 96 10.67 9 1.00 M 2 6 70 11.67 6 1.00 C 2 6 66 11.00 6 1.00 P 3 10 97 9.70 10 1.00 V 3 8 66 8.25 8 1.00 G 3 8 56 7.00 8 1.00 U 1 4 20 5.00 4 1.00 D 2 6 56 9.33 6 1.00 q 4 12 102 8.50 12 1.00 z 2 5 36 7.20 5 1.00 B 1 3 18 6.00 3 1.00 Y 1 3 36 12.00 3 1.00 W 2 6 48 8.00 6 1.00 X 2 6 45 7.50 6 1.00 Q 1 3 27 9.00 3 1.00 F 1 3 30 10.00 3 1.00 H 1 3 18 6.00 3 1.00 J 1 3 45 15.00 3 1.00 j 3 6 54 9.00 6 1.00 Z 2 4 38 9.50 8 2.00 ee 1 2 10 5.00 4 2.00 ne ---------------------------------------------------------------------- 1062 4909 21505 4.38 4915 1.00 TOTAL ---------------------------------------------------------------------- *** local variable optimization summary *** ---------------------------------------------------------- Variable Unique Decl. Token Size Average Types Names Count Count Bytes Bytes ---------------------------------------------------------- Global 27 0 51 280 5.49 ---------------------------------------------------------- Local (in) 481 1062 4909 21505 4.38 TOTAL (in) 508 1062 4960 21785 4.39 ---------------------------------------------------------- Local (out) 55 1062 4909 4915 1.00 TOTAL (out) 82 1062 4960 5195 1.05 ---------------------------------------------------------- (line 209) "([\n\r\\\"\'])" -> "([\n\r\\\"'])" (line 310) "-[\"\'.=<>~" -> "-[\"'.=<>~" (line 2001) "abfnrtv\\\n\r\"\'0123456789" -> "abfnrtv\\\n\r\"'0123456789" (line 2076) "([\'\"])" -> "(['\"])" (line 3633) "\"" -> '"' (line 3750) "cannot open \"" -> 'cannot open "' (line 3750) "\" for writing" -> '" for writing' (line 3752) "cannot write to \"" -> 'cannot write to "' (line 3752) "\"" -> '"' *** SRCEQUIV: token streams are sort of equivalent (but no identifier comparisons since --opt-locals enabled) *** BINEQUIV: binary chunks are sort of equivalent Statistics for: LuaSrcDiet.lua -> app_maximum.lua *** lexer-based optimizations summary *** -------------------------------------------------------------------- Lexical Input Input Input Output Output Output Elements Count Bytes Average Count Bytes Average -------------------------------------------------------------------- TK_KEYWORD 3088 12257 3.97 3088 12257 3.97 TK_NAME 5421 24160 4.46 5421 7570 1.40 TK_NUMBER 468 495 1.06 468 495 1.06 TK_STRING 787 7983 10.14 787 7974 10.13 TK_LSTRING 14 3443 245.93 14 3443 245.93 TK_OP 6405 6888 1.08 6405 6888 1.08 TK_EOS 1 0 0.00 1 0 0.00 -------------------------------------------------------------------- TK_COMMENT 1616 72434 44.82 1 18 18.00 TK_LCOMMENT 18 4409 244.94 0 0 0.00 TK_EOL 4430 4430 1.00 1792 1792 1.00 TK_SPACE 10490 24704 2.36 2074 2074 1.00 -------------------------------------------------------------------- Total Elements 32738 161203 4.92 20051 42511 2.12 -------------------------------------------------------------------- Total Tokens 16184 55226 3.41 16184 38627 2.39 --------------------------------------------------------------------