English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
What is a match statement translated into?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-18 (06:55)
From: Joel Reymont <joelr1@g...>
Subject: What is a match statement translated into?
Folks,

Is pattern-matching code in OCaml expanded into threaded code (pre- 
computed branch table) or something analogous to the C switch  
statement (lots of branching)?

How do I find out?

I suspect this should be quite optimized but I haven't tried dumping  
disassembling native-compiled OCaml yet and I wonder if there's a  
simpler approach.

	Thanks, Joel

--
http://wagerlabs.com