Friday, November 27, 2015

Digest for comp.lang.c++@googlegroups.com - 5 updates in 4 topics

"J. Clarke" <j.clarke.873638@gmail.com>: Nov 27 11:44AM -0500

In article <ms0v4a$2qv8$1@adenine.netfront.net>, nospam@thanks.invalid
says...
> quintessential example). And we don't even need some highly-twinkered
> artificial constructed example for this. The code for std::sort() doesn't
> need to resort to low-level trickery to achieve this speed.
 
Do qsort and std::sort() implement the same algorithm? If not then you
are not comparing languages, you are comparing libraries.

Robert Wessel <robertwessel2@yahoo.com>: Nov 27 12:53PM -0600

On Fri, 27 Nov 2015 11:44:11 -0500, "J. Clarke"
>> need to resort to low-level trickery to achieve this speed.
 
>Do qsort and std::sort() implement the same algorithm? If not then you
>are not comparing languages, you are comparing libraries.
 
 
Sometimes they do, and sometimes they don't. The advantage of
std:sort is that the comparison function can be trivially inlined by
the compiler, and the code specialized for the particular array being
compared. So particularly for relatively simple arrays of elements
with modest size and simple comparisons, that's a pretty big win for
std:sort.
 
Now that's not impossible for qsort(), particularly with LTCG, but
I've not seen a standard library that shipped in the intermediate form
needed to make that work, or the code for qsort included in the
header, probably as a "static inline" function. FWIW, I posted the
following earlier this year:
 
 
Rosario19 <Ros@invalid.invalid>: Nov 27 10:15AM +0100

On Thu, 26 Nov 2015 12:20:11 +0100, Rosario19 wrote:
 
>in C if one has one string has "\n"
>the buffer is fhush when it meet "\n"
>if i remember well
 
if i understand well there are case
it is useful sys not flush when meet "\n" ...
if one has to do a pipe or interprocess comunication,
it has to flush only when EOF, or buffer full, or explicit flush
"Öö Tiib" <ootiib@hot.ee>: Nov 26 09:26PM -0800

On Thursday, 26 November 2015 19:09:06 UTC+2, Puppet_Sock wrote:
> > after some years of usage. It is more like an art to know when to reuse the
> > existing and when exactly the wheel needs reinventing.
 
> I'm not talking about reinventing.
 
Forgot to reply to that one. If your program involves lot of linear algebra
and matrices then it seems that currently the winner open source C++
library for that is Eigen3. It uses OpenMP. It uses explicit vectorization
instructions of most popular processors. It is licensed MPL2 that means
with weak copyleft. Eigen is popular and used so you may find people who
are already familiar with it.
1971 powerChina <chinapower1971@gmail.com>: Nov 26 09:04PM -0800

pwwMap has update
http://sourceforge.net/projects/pwwhashmap/files/stats/timeline
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: