comp.lang.ada
 help / color / mirror / Atom feed
From: Colin Paul Gloster <Colin_Paul_Gloster@ACM.org>
Subject: Re: Interesting performance quirk.
Date: Wed, 29 Oct 2008 16:12:25 +0000
Date: 2008-10-29T16:12:25+00:00	[thread overview]
Message-ID: <Pine.WNT.4.64.0810291542190.4032@teor1> (raw)
In-Reply-To: <4906f908$0$5781$4d3efbfe@news.sover.net>

In
news:4904516f$0$28741$4d3efbfe@news.sover.net
on October 26th, 2008, Peter C. Chapin submitted:
|------------------------------------------------------------------------|
|"[..]                                                                   |
|                                                                        |
|I am also planning to write a similar program in C using OpenSSL's      |
|Blowfish implementation. I want to get a point of comparison to see if  |
|my implementation has "reasonable" performance or not (here I'm assuming|
|that OpenSSL is reasonable). I'm curious now if the C/OpenSSL version   |
|will also demonstrate this same performance quirk."                     |
|------------------------------------------------------------------------|

I had intended to reply with a claim that any language would be sped
up in the emulated system, however instead in
news:4906f908$0$5781$4d3efbfe@news.sover.net
on Tue, 28 Oct 2008, Peter C. Chapin submitted:
|------------------------------------------------------------------------|
|"[..]                                                                   |
|                                                                        |
|In further developments...                                              |
|                                                                        |
|I wrote a version of the benchmark program in C that uses OpenSSL's     |
|Blowfish implementation. The program is the "same" in that it creates   |
|the same amount of data and processes it in the same way. The only      |
|significant difference is that it calls into OpenSSL. It's quite a bit  |
|faster. Right now I get                                                 |
|                                                                        |
|Windows XP Laptop (GNAT GPL 2008 for the Ada, Cygwin gcc for the C)     |
|-----                                                                   |
|My Library => 11 MB/s  (with -O2 option and no debugging support)       |
|OpenSSL    => 65 MB/s  (Wow!)                                           |
|                                                                        |
|SUSE Linux in a VM on the same box                                      |
|-----                                                                   |
|My Library => 25 MB/s  (odd)                                            |
|OpenSSL    => 65 MB/s  (now this makes sense at least)                  |
|                                                                        |
|[..]"                                                                   |
|------------------------------------------------------------------------|

Earlier this year I had used QEMU on Windows (possibly not Windows XP)
to have a GNU/Linux distribution (possibly RedHat) emulated. I ran a
Bourne shell script or a Bourne Again SHell script in the emulated
system which made thousands of fairly short I/O transactions. The
emulated system including its pretend harddisk were kept small enough
(no more than a few hundred megabytes) to be kept solely in the real
physical primary memory instead of relying on virtual memory.

It was faster than running the same script on Cygwin on the same
machine. (The throughput of my shell script was faster in the emulated
system, whereas the human user interface of the emulated system was
dominated by how quickly it starts to respond instead of throughput,
and suffered from sluggish latencies.) Conversely, on
WWW.Debian.org/intro/why_debian
it was claimed:
!-------------------------------------------------------------------!
!"If you are not already a GNU/Linux user, you may also enjoy the   !
!following benefits:                                                !
!                                                                   !
![..]                                                               !
!Fast and easy on memory                                            !
!    Other operating systems may be as fast in one or two areas, but!
!    being based on GNU/Linux, Debian is lean and mean. Windows     !
!    software run from GNU/Linux using an emulator sometimes runs   !
!    faster than when run in the native environment.                !
![..]"                                                              !
!-------------------------------------------------------------------!
That Debian webpage lacks important information for a fair comparison
with Windows.

However, I do not know why Peter C. Chapin's Ada code is sped up but
OpenSSL is not.

Yours sincerely,
Colin Paul Gloster



  parent reply	other threads:[~2008-10-29 16:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-26  0:57 Interesting performance quirk Peter C. Chapin
2008-10-26  2:15 ` Jeffrey Creem
2008-10-26 11:16   ` Peter C. Chapin
2008-10-26  4:57 ` tmoran
2008-10-26 11:11   ` Peter C. Chapin
2008-10-28  8:49     ` Martin
2008-10-28 11:35       ` Peter C. Chapin
2008-10-28 14:21         ` Robert A Duff
2008-10-29  1:42           ` Peter C. Chapin
2008-10-28 18:27         ` Jeffrey R. Carter
2008-10-29  1:39           ` Peter C. Chapin
2008-10-29  5:27             ` Jeffrey R. Carter
2008-10-28 23:22         ` Ludovic Brenta
2008-10-29  8:42           ` oenone
2008-10-29  9:59           ` Peter C. Chapin
2008-10-29 10:19             ` Martin
2008-11-17  6:31             ` David Thompson
2008-11-17 11:51               ` Peter C. Chapin
2008-10-29  9:54         ` Alex R. Mosteo
2008-10-30 11:16           ` Peter C. Chapin
2008-10-29 16:12         ` Colin Paul Gloster [this message]
2008-10-30 11:23           ` Peter C. Chapin
2008-10-31 13:41             ` Colin Paul Gloster
2008-11-01 15:41               ` Gene
2008-10-29 20:18 ` Florian Weimer
2008-10-30 11:15   ` Peter C. Chapin
2008-11-07  0:44 ` Randy Brukardt
2008-11-07  1:23   ` Peter C. Chapin
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox