diff -N -P -u extlib-1.5.1/IO.ml extlib-1.5.1_write_double_once/IO.ml
--- extlib-1.5.1/IO.ml	2007-12-28 01:47:08.000000000 +0100
+++ extlib-1.5.1_write_double_once/IO.ml	2008-06-19 17:51:47.000000000 +0200
@@ -27,6 +27,7 @@
 type 'a output = {
 	mutable out_write : char -> unit;
 	mutable out_output : string -> int -> int -> int;
+	mutable out_output_unsafe : string -> int -> int -> int;
 	mutable out_close : unit -> 'a;
 	mutable out_flush : unit -> unit;
 }
@@ -53,6 +54,7 @@
 		out_output = output;
 		out_close = close;
 		out_flush = flush;
+		out_output_unsafe = output;
 	}
 
 let read i = i.in_read()
@@ -145,6 +147,9 @@
 	if p + l > sl || p < 0 || l < 0 then invalid_arg "IO.output";
 	o.out_output s p l
 
+let output_unsafe o s p l =
+	o.out_output_unsafe s p l
+
 let printf o fmt =
 	Printf.kprintf (fun s -> nwrite o s) fmt
 
@@ -207,6 +212,11 @@
 			p := !p + n;
 			n
 		);
+		out_output_unsafe = (fun s sp l ->
+			let n = o.out_output_unsafe s sp l in
+			p := !p + n;
+			n
+		);
 		out_close = o.out_close;
 		out_flush = o.out_flush;
 	} , (fun () -> !p)
@@ -244,6 +254,10 @@
 			Buffer.add_substring b s p l;
 			l
 		);
+		out_output_unsafe = (fun s p l ->
+			Buffer.add_substring b s p l;
+			l
+		);
 		out_close = (fun () -> Buffer.contents b);
 		out_flush = (fun () -> ());
 	}
@@ -264,12 +278,16 @@
 		in_close = (fun () -> Pervasives.close_in ch);
 	}
 
+external unsafe_output: out_channel -> string -> int -> int -> unit
+	= "caml_ml_output"
+
 let output_channel ch =
 	{
 		out_write = (fun c -> output_char ch c);
 		out_output = (fun s p l -> Pervasives.output ch s p l; l);
 		out_close = (fun () -> Pervasives.close_out ch);
 		out_flush = (fun () -> Pervasives.flush ch);
+		out_output_unsafe = (fun s p l -> unsafe_output ch s p l; l);
 	}
 
 let input_enum e =
@@ -310,6 +328,10 @@
 			Buffer.add_substring b s p l;
 			l
 		);
+		out_output_unsafe = (fun s p l ->
+			Buffer.add_substring b s p l;
+			l
+		);
 		out_close = (fun () ->
 			let s = Buffer.contents b in
 			ExtString.String.enum s
@@ -355,6 +377,7 @@
 	let output = {
 		out_write = write;
 		out_output = output;
+		out_output_unsafe = output;
 		out_close = (fun () -> ());
 		out_flush = (fun () -> ());
 	} in
@@ -512,6 +535,9 @@
 let write_double ch f =
 	write_i64 ch (Int64.bits_of_float f)
 
+let write_double_once ch (d : float) =
+	ignore(output_unsafe ch (Obj.magic d : string) 0 8)
+
 (* -------------------------------------------------------------- *)
 (* Big Endians *)
 
diff -N -P -u extlib-1.5.1/IO.mli extlib-1.5.1_write_double_once/IO.mli
--- extlib-1.5.1/IO.mli	2007-12-28 01:47:08.000000000 +0100
+++ extlib-1.5.1_write_double_once/IO.mli	2008-06-19 17:52:03.000000000 +0200
@@ -220,6 +220,8 @@
 val write_double : 'a output -> float -> unit
 (** Write an IEEE double precision floating point value. *)
 
+val write_double_once : 'a output -> float -> unit
+
 val write_string : 'a output -> string -> unit
 (** Write a string and append an null character. *)
 
diff -N -P -u extlib-1.5.1/test.ml extlib-1.5.1_write_double_once/test.ml
--- extlib-1.5.1/test.ml	1970-01-01 01:00:00.000000000 +0100
+++ extlib-1.5.1_write_double_once/test.ml	2008-06-19 17:53:40.000000000 +0200
@@ -0,0 +1,22 @@
+
+let test f =
+  let t1 = Sys.time() in
+
+  for i=1 to 3_000_000 do
+    f 128.256;
+  done;
+
+  let t2 = Sys.time() in
+  Printf.printf " %f\n" (t2 -. t1);
+;;
+
+let () =
+  let oc = Pervasives.open_out "/dev/null" in
+  let ch = IO.output_channel oc in
+
+  test (IO.write_double_once ch);
+  test (IO.write_double ch);
+
+  Pervasives.close_out oc;
+;;
+
diff -N -P -u extlib-1.5.1/test.sh extlib-1.5.1_write_double_once/test.sh
--- extlib-1.5.1/test.sh	1970-01-01 01:00:00.000000000 +0100
+++ extlib-1.5.1_write_double_once/test.sh	2008-06-19 17:54:40.000000000 +0200
@@ -0,0 +1 @@
+ocamlopt -I . extLib.cmxa test.ml -o test.opt
