Browse thread
[Caml-list] Where does Ocaml spend all the time?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Florian Hars <florian@h...> |
| Subject: | [Caml-list] Where does Ocaml spend all the time? |
I have written an ocaml program, which is about an order of magnitude slower than a similar C program, and now I am wondering what to do. According to gprof, I have neiter written nor called most of the top-scoring functions in my program: % cumulative self self total time seconds seconds calls ms/call ms/call name 9.82 2.76 2.76 9822122 0.00 0.00 Verzeichnis_code_end 9.00 5.29 2.53 3275 0.77 0.77 mark_slice 8.15 7.58 2.29 17860 0.13 0.54 Stra$dfen_e_i_l_rec_129 8.04 9.84 2.26 23232718 0.00 0.00 string_equal 7.44 11.93 2.09 4088 0.51 0.62 sweep_slice 5.73 13.54 1.61 390646 0.00 0.01 oldify 4.16 14.71 1.17 22241546 0.00 0.00 Eintrag_code_begin 3.88 15.80 1.09 Stringhilfsfunktionen_code_begin Only the third and fourth entry seem to do anything "useful", the rest looks like administrative overhead to me. What are these functions doing? Are there any general hints on how to write ocaml programs for efficiency? Like, don't use functional updates for records to reduce garbage? Yours, Florian. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr