gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] speed


From: folkert
Subject: [open-cobol-list] speed
Date: Fri, 20 May 2016 00:09:15 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

While experimenting with my brainfuck-to-cobol translator (
http://tinyurl.com/bftocob ) I noticed that if I do not let cobc
directly output a binary (on linux) but go through the gnu-c compiler
instead, that I get a 16,8% speed improvement (tested with a mandelbrot
fractal).
Is this to be expected?

compiled and linked by cobc (cobc -O2)
--------------------------------------
real    11m19.063s
user    11m15.768s
sys     0m1.084s

translated to c and then compiled with gnu-c
--------------------------------------------
real    9m25.608s
user    9m24.040s
sys     0m0.492s

What I did:
cobc -O2 -fimplicit-init -C mandelbrot.cbl
gcc -O3 -march=native -mtune=native -fomit-frame-pointer -lcob mandelbrot.c -o 
mb2


Also: how does cobc create the binary, does it run gnu-c underneath? Or
does it compile to binary by itself?


Folkert van Heusden

-- 
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]