fwrite test added
[svn/Cll1h/.git] / demos / performance / fwrite2.c
diff --git a/demos/performance/fwrite2.c b/demos/performance/fwrite2.c
new file mode 100644 (file)
index 0000000..30e345a
--- /dev/null
@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include <string.h>
+
+#define RUNS 10000000UL
+int main (void)
+{
+ unsigned long i;
+ char *s1="stuff1";
+ char *s2="stuff2";
+ int l1=strlen(s1);
+ int l2=strlen(s2);
+ for (i=0;i<RUNS;i++) 
+ {
+  fwrite(s1,l1,1,stdout);
+  fwrite(" ",1,1,stdout);
+  fwrite(s2,l2,1,stdout);
+  fwrite("\n",1,1,stdout);
+ }
+ return 0;
+}
This page took 0.090177 seconds and 4 git commands to generate.