Erlang Efficiency quesitons

Bjorn Gustavsson bjorn@REDACTED
Thu Mar 15 20:46:11 CET 2001


Chris Pressey <cpressey@REDACTED> writes:
> I like some of the ramifications of optimizing strings.  For example
> Erlang programs would compile a bit quicker (unless I'm profoundly
> mistaken about how the compiler works.)

I doubt that. Strings are not used much inside the compiler. Tuples,
records, and lists are. Strings are only used a lot in the parser pass.

$ /usr/bin/time erlc +time erl_parse.erl
 error_if_jam                  :      0.000 s (5240 k)
 remove_file                   :      0.000 s (5240 k)
 parse_module                  :      1.430 s (23040 k)
 transform_module              :      0.000 s (23040 k)
 lint_module                   :      0.530 s (23040 k)
 expand_module                 :      0.210 s (23040 k)
 v3_core                       :      0.380 s (23040 k)
 v3_core_opt                   :      0.980 s (23040 k)
 v3_kernel                     :      1.050 s (23040 k)
 v3_life                       :      0.440 s (27040 k)
 v3_codegen                    :      0.800 s (27040 k)
 beam_block                    :      0.340 s (27040 k)
 beam_bs                       :      0.030 s (27040 k)
 beam_jump                     :      0.140 s (27040 k)
 beam_type                     :      0.090 s (27040 k)
 beam_flatten                  :      0.030 s (27040 k)
 beam_asm                      :      0.260 s (27040 k)
 save_binary                   :      0.000 s (27040 k)

real       16.9
user        7.3
sys         1.1

As you can see, the parse_module pass consumes only a relatively
small proportion of the compilation time.

/Bjorn

-- 
Björn Gustavsson            Ericsson Utvecklings AB
bjorn@REDACTED      ÄT2/UAB/F/P
			    BOX 1505
+46 8 727 56 87 	    125 25 Älvsjö



More information about the erlang-questions mailing list