Category ArchiveC++



C++ &Rants 15 Jun 2021 10:25 pm

Freenode

I registered on Freenode on 2009-03-21 at 17:25:41 UTC, to participate in the Apertium channel #apertium. I also joined the C++ channel ##C++.

On 2011-06-29 at 11:06:39 UTC, I created ##C++-general with the blessing of the ##C++ operators. This quickly grew to be the 2nd largest C++ channel on Freenode, and indeed on any network at the time.

On 2015-04-15 at 13:32:10 UTC, I was granted operator status for the main ##C++ – the largest C++ channel on any IRC network at the time.

On 2021-05-19 at 07:54 UTC, this happened: ChanServ (ChanServ@services.) Quit (Killed (grumble (My fellow staff so-called 'friends' are about to hand over account data to a non-staff member. If you care about your data, drop your NickServ account NOW before that happens.)))

Immediately thereafter, I contacted my fellow Apertium PMC members so that we could prepare in case Freenode was actually taken over by non-free interests.

A few hours later, Freenode was taken over and most of the staff resigned. I got on Libera.chat as soon as it opened up and registered #Apertium, #C++, #C++-general, and #geordi.

On 2021-05-24, I applied for a Community Registration for the C++ channels on Libera.chat. However, the C++ channels’ policy was to maintain both networks and not get involved with the politics of the situation.

On 2021-05-27, Apertium officially moved from Freenode to OFTC.

On 2021-06-14 at 21:37:09 UTC, Freenode intentionally split the network in two, leaving an old Freenode with existing channels and nicks, and a new Freenode with no registered channels or nicks.

On 2021-06-15 at 07:42:07 UTC, I joined the new Freenode and kicked everyone from ##C++-general with a message to go to Libera.chat.

At 08:05:53 UTC, I kicked root and f from ##C++-general.

I was k-lined from the new Freenode on 2021-06-15 at 08:06 UTC.

At 09:13 UTC, I joined the old Freenode and kicked everyone from ##C++ and ##C++-general with a message to go to Libera.chat instead.

At 19:17 UTC, the remaining oper on old Freenode removed me from ##C++-general.

At 19:38 UTC, the old Freenode was shut down.

C++ 25 Feb 2012 01:19 pm

C++ vector vs realloc()

A comparison of how many reallocations a worse case poorly coded use of realloc() does, compared to just using std::vector. 10000000 integers are added to the containers one-by-one. Clearly you would never abuse realloc() like this in real code, but it’s interesting nonetheless. Idea from sacrebleu at Freenode’s ##C++.

The full source is available in svn as a CMake project for easy cross-platform testing. Primary source vector-realloc.cpp

Allocs / OSstd::vectorrealloc()
Windows 7409526
Linux: Arch24367
Linux: Fedora 1024438
Mac OS X2431
  • Mac OS X: OS X 10.7.3, 2.3 GHz Core i5, 8 GiB RAM. XCode 4.3, clang++ 3.1 -std=c++0x -stdlib=libc++ -O3.
  • Windows 7: 64 bit, 1.60GHz Core i7 Q720, 8 GiB RAM. MSVC++ 2010 _SECURE_SCL=0
  • Linux: Arch: VirtualBox on the Windows machine, VT-x, Arch Linux, kernel 3.2.7-1-ARCH x86_64, 1 GiB RAM. GNU g++ 4.6.2 -std=c++0x -O3
  • Linux: Fedora 10: Fedora 10, kernel 2.6.27 x86_64, 2.66GHz Xeon, 8 GiB RAM. GNU g++ 4.4.1 -O3

C++ 20 Feb 2012 04:12 pm

C++ Set Performance 2

(Old version from 2010-04-02)

A performance comparison of the speed of operations on the various set implementations used in C++. There are 16383 unique elements across which 1000000 insert, lookup, iterate, and erase operations are performed.

The raw tick numbers are shown and table sorting is enabled so you can compare for yourself. Just be aware that the Mac OS X, Linux, and Windows numbers cannot be compared against each other.

The full source is available in svn as a CMake project for easy cross-platform testing.

Sources


Continue Reading »

C++ 31 Aug 2011 10:27 pm

C++ Include Speed

A performance benchmark of which include guard method is faster. Test times the compilation of a main.cpp that includes 10000 files 3 times each.

The tested methods are:

  • #pragma once followed by #ifndef
  • #ifndef followed by #pragma once
  • Only #pragma once
  • Only #ifndef
  • External #ifndef

Sources for the test is at inc.tar.gz, but it’s just 5×10000 files.

The compilers are Microsoft Visual C++ 2010, GNU g++ 4.6.1, and LLVM clang++ 2.9.


Continue Reading »

C++ 28 May 2011 07:04 pm

C++ Convert String to Double Speed

(There is also a string-to-int performance test.)

A performance benchmark of which method is faster of converting an std::string to a double. The goal is ending up with a double of the value represented in an std::string.

The tested methods are:

Source for the test is at speed-string-to-double.cpp with cycle.h.

The compilers are Microsoft Visual C++ 2010 with _SECURE_SCL disabled, GNU g++ 4.6.0, and LLVM clang++ from Arch.


Continue Reading »

Next Page »