0.4.1.2e - Page 2
 

News:

11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

0.4.1.2e

Started by PPK, 06 February, 2011, 03:52:30

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PPK

Quote from: bastya_elvtars on 24 February, 2011, 18:05:40
By the way, ain't UserConnected only called when an unregistered user enters?
Of course it is ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

mariner

Hm. I tests PtokaX on different arches. And everywere have equel result. Sources from your tarball and with my modifications works correctly. So, I think, you right. Your code work correctly, if we don't use optimizations flags(I don't understand one thing. Why is reducing cpu usage bad?). Sorry PPK.
Eat my bolts, bastard... ? member of Devaster Squad

sudo ./configure_brain.sh

PPK

Optimizations can cause many bugs (for example look to kernel changelog how many fixes for gcc bugs they have), and posix PtokaX have enough bugs without that (high memory usage, buggy timers, incompatibility with udp-debugger when running on big-endian...)  ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PPK

As i wrote, with IPv6 support was strict-aliasing issue partially fixed. SVN rev 72 is fixing rest :P

Compile @ debian wheezy with O3 (O2 have same result)
Quoteroot@wheezy:/home/petr/PtokaX# make
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ClientTagManager.cpp -o /home/petr/PtokaX/obj/ClientTagManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/colUsers.cpp -o /home/petr/PtokaX/obj/colUsers.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/DcCommands.cpp -o /home/petr/PtokaX/obj/DcCommands.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/DeFlood.cpp -o /home/petr/PtokaX/obj/DeFlood.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/eventqueue.cpp -o /home/petr/PtokaX/obj/eventqueue.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/globalQueue.cpp -o /home/petr/PtokaX/obj/globalQueue.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/hashBanManager.cpp -o /home/petr/PtokaX/obj/hashBanManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/hashUsrManager.cpp -o /home/petr/PtokaX/obj/hashUsrManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/hashRegManager.cpp -o /home/petr/PtokaX/obj/hashRegManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/HubCommands.cpp -o /home/petr/PtokaX/obj/HubCommands.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/IP2Country.cpp -o /home/petr/PtokaX/obj/IP2Country.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LanguageManager.cpp -o /home/petr/PtokaX/obj/LanguageManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaBanManLib.cpp -o /home/petr/PtokaX/obj/LuaBanManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaCoreLib.cpp -o /home/petr/PtokaX/obj/LuaCoreLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaIP2CountryLib.cpp -o /home/petr/PtokaX/obj/LuaIP2CountryLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaProfManLib.cpp -o /home/petr/PtokaX/obj/LuaProfManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaRegManLib.cpp -o /home/petr/PtokaX/obj/LuaRegManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaScript.cpp -o /home/petr/PtokaX/obj/LuaScript.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaScriptManager.cpp -o /home/petr/PtokaX/obj/LuaScriptManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaScriptManLib.cpp -o /home/petr/PtokaX/obj/LuaScriptManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaSetManLib.cpp -o /home/petr/PtokaX/obj/LuaSetManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaTmrManLib.cpp -o /home/petr/PtokaX/obj/LuaTmrManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaUDPDbgLib.cpp -o /home/petr/PtokaX/obj/LuaUDPDbgLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ProfileManager.cpp -o /home/petr/PtokaX/obj/ProfileManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/PtokaX-nix.cpp -o /home/petr/PtokaX/obj/PtokaX.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/pxstring.cpp -o /home/petr/PtokaX/obj/pxstring.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/RegThread.cpp -o /home/petr/PtokaX/obj/RegThread.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ResNickManager.cpp -o /home/petr/PtokaX/obj/ResNickManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ServerManager.cpp -o /home/petr/PtokaX/obj/ServerManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ServerThread.cpp -o /home/petr/PtokaX/obj/ServerThread.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/serviceLoop.cpp -o /home/petr/PtokaX/obj/serviceLoop.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/SettingManager.cpp -o /home/petr/PtokaX/obj/SettingManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/TextFileManager.cpp -o /home/petr/PtokaX/obj/TextFileManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/UdpDebug.cpp -o /home/petr/PtokaX/obj/UdpDebug.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/UDPThread.cpp -o /home/petr/PtokaX/obj/UDPThread.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/User.cpp -o /home/petr/PtokaX/obj/User.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/utility.cpp -o /home/petr/PtokaX/obj/utility.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ZlibUtility.cpp -o /home/petr/PtokaX/obj/ZlibUtility.o
g++ \
        /home/petr/PtokaX/obj/ClientTagManager.o /home/petr/PtokaX/obj/colUsers.o /home/petr/PtokaX/obj/DcCommands.o /home/petr/PtokaX/obj/DeFlood.o /home/petr/PtokaX/obj/eventqueue.o /home/petr/PtokaX/obj/globalQueue.o /home/petr/PtokaX/obj/hashBanManager.o /home/petr/PtokaX/obj/hashUsrManager.o \
        /home/petr/PtokaX/obj/hashRegManager.o /home/petr/PtokaX/obj/HubCommands.o /home/petr/PtokaX/obj/IP2Country.o /home/petr/PtokaX/obj/LanguageManager.o /home/petr/PtokaX/obj/LuaBanManLib.o /home/petr/PtokaX/obj/LuaCoreLib.o /home/petr/PtokaX/obj/LuaIP2CountryLib.o \
        /home/petr/PtokaX/obj/LuaProfManLib.o /home/petr/PtokaX/obj/LuaRegManLib.o /home/petr/PtokaX/obj/LuaScript.o /home/petr/PtokaX/obj/LuaScriptManager.o /home/petr/PtokaX/obj/LuaScriptManLib.o /home/petr/PtokaX/obj/LuaSetManLib.o /home/petr/PtokaX/obj/LuaTmrManLib.o \
        /home/petr/PtokaX/obj/LuaUDPDbgLib.o /home/petr/PtokaX/obj/ProfileManager.o /home/petr/PtokaX/obj/PtokaX.o /home/petr/PtokaX/obj/pxstring.o /home/petr/PtokaX/obj/RegThread.o /home/petr/PtokaX/obj/ResNickManager.o /home/petr/PtokaX/obj/ServerManager.o /home/petr/PtokaX/obj/ServerThread.o \
        /home/petr/PtokaX/obj/serviceLoop.o /home/petr/PtokaX/obj/SettingManager.o /home/petr/PtokaX/obj/TextFileManager.o /home/petr/PtokaX/obj/UdpDebug.o /home/petr/PtokaX/obj/UDPThread.o /home/petr/PtokaX/obj/User.o /home/petr/PtokaX/obj/utility.o /home/petr/PtokaX/obj/ZlibUtility.o \
        /home/petr/PtokaX/tinyxml/tinyxml.a -o PtokaX -lpthread -llua5.1 -lrt -lz
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PPK

And as expected, zero difference in cpu usage  :-X
Version without optimizations:
QuoteVersion: PtokaX DC Hub 0.4.2.0 [build 314] built on Oct 31 2011 00:10:37
OS: Linux 2.6.32.28 (x86_64)
Users (Max/Actual Peak (Max Peak)/Logged): 666 / 495 (649) / 482
CPU usage (60 sec avg): 0.25%
Version with O3 optimizations:
QuoteVersion: PtokaX DC Hub 0.4.2.0 [build 320] built on Feb  4 2012 20:01:49
OS: Linux 2.6.32.28 (x86_64)
Users (Max/Actual Peak (Max Peak)/Logged): 666 / 511 (649) / 486
CPU usage (60 sec avg): 0.26%

Compiler optimizations simply can't do miracles with code that was hand optimized by developer :P
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

SMF spam blocked by CleanTalk