From: Hendrik Tews <tews@cs.ru.nl>
To: caml-list@inria.fr
Subject: Re: [Caml-list] SafeUnmarshal: questions/problems/timings
Date: Thu, 14 Sep 2006 15:07:41 +0200 [thread overview]
Message-ID: <17673.21533.259925.817603@tandem.cs.ru.nl> (raw)
Here is the promised followup with more details on the slow safe
unmarshalling. On
http://www.cs.ru.nl/~tews/nsUnicodeToTeXCMRt1.i.oast you can
download 281 KB of marshalled data. On my machine it takes 23
seconds to check with native code.
The data is of type
annotated translationUnit_type = annotated * annotated topForm_type list
You can test it with the following piece of code:
open Cc_ast_gen_type
open Ast_annotation
let file = "/home/tews/src/elsa/elsa/in/big/nsUnicodeToTeXCMRt1.i.oast"
;;
try
SafeUnmarshal.from_channel
[^ annotated translationUnit_type ^]
(open_in file);
print_endline "OK"
with
| _ -> print_endline "FAIL"
compile with
ocamlopt.opt safeUnmarshal.cmxa ast_annotation.ml elsa_util.ml \
ml_ctype.ml cc_ml_types.ml cc_ast_gen_type.ml justunmarshal.ml
The additional files are from Olmar, get them here:
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/elsa/ast_annotation.ml?revision=olmar-release-2006-09-07
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/elsa/elsa_util.ml?revision=olmar-release-2006-09-07
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/elsa/ml_ctype.ml?revision=olmar-release-2006-09-07
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/elsa/cc_ml_types.ml?revision=olmar-release-2006-09-07
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/elsa/cc_ast_gen_type.ml?revision=olmar-release-2006-09-07
To produce graphs like http://www.cs.ru.nl/~tews/marshal-plot.eps
you need to download Olmar, compile it and then
- ./regrtest -ocaml in subdir elsa
- ./regtest-oast | grep time >data in subdir asttools
- gnuplot plot
where the plot file is something like
reset
set grid
unset mouse
set terminal x11 persist
#set terminal postscript enhanced color
set xlabel "size (Bytes)"
set ylabel "time (s)"
set key left
z = 2.1
plot "data" using 6:3 title "SafeUnmarshal user time", \
(0.000017088 * x) ** 2.1
Bye,
Hendrik
next reply other threads:[~2006-09-14 13:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-14 13:07 Hendrik Tews [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-29 23:39 Hendrik Tews
2006-08-31 10:01 ` [Caml-list] " Grégoire Henry
2006-09-01 9:23 ` Hendrik Tews
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17673.21533.259925.817603@tandem.cs.ru.nl \
--to=tews@cs.ru.nl \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox