Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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?

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