Google Groups Home Help | Sign in
SafeUnmarshal: questions/problems/timings
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Hendrik Tews  
View profile
 More options Sep 14 2006, 9:08 am
Newsgroups: fa.caml
From: Hendrik Tews <t...@cs.ru.nl>
Date: Thu, 14 Sep 2006 13:08:53 UTC
Local: Thurs, Sep 14 2006 9:08 am
Subject: Re: [Caml-list] SafeUnmarshal: questions/problems/timings

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/els...
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/els...
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/els...
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/els...
http://www.sos.cs.ru.nl/cgi-bin/~tews/olmar/viewvc-patch.cgi/elsa/els...

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

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google