473,698 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why is this code so slow?

Hi,

I'm trying to write the function below and have it working, but I
benchmarked it against strcmp() and its much slower. My test is to compare 2
strings that are identitical 100,000,000 times. Yeah, thats a lot, but I
needed to scale up the test to get a real timing on the function. The weird
thing is, even when I comment out almost the entire function, its still much
slower then strcmp()... at full implementation, strcmp() takes 5 seconds and
my function takes 78 seconds. If I comment everything out in my function
except the main while loop, it still takes 13 seconds. WTH?!?! I *AM* in
debug mode, but so is the crt library.

Basically the goal of this function is to perform a LOGICAL string compare
vs. a textual one. This is also called a NATURAL string compare by some...

For example, a normal string compare will sort as follows:

string1
string10
string2

where as the natural or logical string compare will sort as follows:

string1
string2
string10

taking digits into account as numbers.

the strings I'm comparing are two copies of:

"Sample description [1/10]"

I tried swapping out isdigit() with a quick & dirty macro, and that sped it
up quite a bit, but 5 vs. 78 seconds seems far off. I understand my function
is doing a lot more then strcmp(), but I was expecting maybe 20 to 30
seconds for my function. Not 78 seconds.

P.S. the if (n1 == n2) {} portion of the code is to sort zero padded #'s
correctly... ie... 01 should appear before 1.

I also tried implementing it with strtol()... that allowed me to get rid of
the two while loops that go to the end of the number and some of the pointer
math, but strtol() was sooooo much slower.

--- code below ---
#define SCLF_IGNORECASE 0x00000001

#define DIGIT(x) (x >= _T('0') && x <= _T('9'))
//#define DIGIT(x) isdigit(x)

int __cdecl StrCmpLogical(L PCTSTR lpsz1, LPCTSTR lpsz2, DWORD dwFlags)
{
if ((dwFlags != 0) && (dwFlags != SCLF_IGNORECASE ))
return 0;

if ((lpsz1 != NULL) && (lpsz2 != NULL))
{
while (*lpsz1 != _T('\0'))
{
if (*lpsz2 == _T('\0'))
return 1;

if (/*_istdigit*/DIGIT(*lpsz1))
{
if (!/*_istdigit*/DIGIT(*lpsz2))
return -1;

int n1 = _ttoi(lpsz1);
int n2 = _ttoi(lpsz2);

if (n1 < n2)
return -1;
else if (n1 n2)
return 1;

LPCTSTR lpszOrig1 = lpsz1;
LPCTSTR lpszOrig2 = lpsz2;

while (/*_istdigit*/DIGIT(*lpsz1))
lpsz1++;

while (/*_istdigit*/DIGIT(*lpsz2))
lpsz2++;

if (n1 == n2)
{
int nOffset1 = (int)(lpsz1 - lpszOrig1);
int nOffset2 = (int)(lpsz2 - lpszOrig2);

if (nOffset1 nOffset2)
return -1;
else if (nOffset1 < nOffset2)
return 1;
}
}
else if (/*_istdigit*/DIGIT(*lpsz2))
{
return 1;
}
else
{
if (dwFlags & SCLF_IGNORECASE )
{
TCHAR ch1 = _totlower(*lpsz 1);
TCHAR ch2 = _totlower(*lpsz 2);

if (ch1 < ch2)
return -1;
else if (ch1 ch2)
return 1;
}
else
{
if (*lpsz1 < *lpsz2)
return -1;
else if (*lpsz1 *lpsz2)
return 1;
}

lpsz1++;
lpsz2++;
}
}
}
else
{
if ((lpsz1 == NULL) && (lpsz2 != NULL))
return -1;

if ((lpsz1 == NULL) && (lpsz2 == NULL))
return 0;

if ((lpsz1 != NULL) && (lpsz2 == NULL))
return 1;
}

return 0;
}
May 1 '07 #1
12 3192
On Apr 30, 8:24 pm, "Somebody" <someb...@cox.n etwrote:
Hi,

I'm trying to write the function below and have it working, but I
benchmarked it against strcmp() and its much slower. My test is to compare 2
strings that are identitical 100,000,000 times. Yeah, thats a lot, but I
needed to scale up the test to get a real timing on the function. The weird
thing is, even when I comment out almost the entire function, its still much
slower then strcmp()... at full implementation, strcmp() takes 5 seconds and
my function takes 78 seconds. If I comment everything out in my function
except the main while loop, it still takes 13 seconds. WTH?!?! I *AM* in
debug mode, but so is the crt library.

Basically the goal of this function is to perform a LOGICAL string compare
vs. a textual one. This is also called a NATURAL string compare by some...

For example, a normal string compare will sort as follows:

string1
string10
string2

where as the natural or logical string compare will sort as follows:

string1
string2
string10

taking digits into account as numbers.

the strings I'm comparing are two copies of:

"Sample description [1/10]"

I tried swapping out isdigit() with a quick & dirty macro, and that sped it
up quite a bit, but 5 vs. 78 seconds seems far off. I understand my function
is doing a lot more then strcmp(), but I was expecting maybe 20 to 30
seconds for my function. Not 78 seconds.

P.S. the if (n1 == n2) {} portion of the code is to sort zero padded #'s
correctly... ie... 01 should appear before 1.

I also tried implementing it with strtol()... that allowed me to get rid of
the two while loops that go to the end of the number and some of the pointer
math, but strtol() was sooooo much slower.

--- code below ---

#define SCLF_IGNORECASE 0x00000001

#define DIGIT(x) (x >= _T('0') && x <= _T('9'))
//#define DIGIT(x) isdigit(x)

int __cdecl StrCmpLogical(L PCTSTR lpsz1, LPCTSTR lpsz2, DWORD dwFlags)
{
if ((dwFlags != 0) && (dwFlags != SCLF_IGNORECASE ))
return 0;

if ((lpsz1 != NULL) && (lpsz2 != NULL))
{
while (*lpsz1 != _T('\0'))
{
if (*lpsz2 == _T('\0'))
return 1;

if (/*_istdigit*/DIGIT(*lpsz1))
{
if (!/*_istdigit*/DIGIT(*lpsz2))
return -1;

int n1 = _ttoi(lpsz1);
int n2 = _ttoi(lpsz2);

if (n1 < n2)
return -1;
else if (n1 n2)
return 1;

LPCTSTR lpszOrig1 = lpsz1;
LPCTSTR lpszOrig2 = lpsz2;

while (/*_istdigit*/DIGIT(*lpsz1))
lpsz1++;

while (/*_istdigit*/DIGIT(*lpsz2))
lpsz2++;

if (n1 == n2)
{
int nOffset1 = (int)(lpsz1 - lpszOrig1);
int nOffset2 = (int)(lpsz2 - lpszOrig2);

if (nOffset1 nOffset2)
return -1;
else if (nOffset1 < nOffset2)
return 1;
}
}
else if (/*_istdigit*/DIGIT(*lpsz2))
{
return 1;
}
else
{
if (dwFlags & SCLF_IGNORECASE )
{
TCHAR ch1 = _totlower(*lpsz 1);
TCHAR ch2 = _totlower(*lpsz 2);

if (ch1 < ch2)
return -1;
else if (ch1 ch2)
return 1;
}
else
{
if (*lpsz1 < *lpsz2)
return -1;
else if (*lpsz1 *lpsz2)
return 1;
}

lpsz1++;
lpsz2++;
}
}
}
else
{
if ((lpsz1 == NULL) && (lpsz2 != NULL))
return -1;

if ((lpsz1 == NULL) && (lpsz2 == NULL))
return 0;

if ((lpsz1 != NULL) && (lpsz2 == NULL))
return 1;
}

return 0;

}

the string library is probably intrinsic with your compiler, and
strcmp works off the knowledge that one can compare multiple bytes at
a time before the end of the string. it may be faster for you to write
an inlined function that finds the first number in a string, then
strcmp the bytes previous to the numbers, and then do your inlined
compare of the numbers

May 1 '07 #2

<cp*****@gmail. comwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
On Apr 30, 8:24 pm, "Somebody" <someb...@cox.n etwrote:
<snip>
>
the string library is probably intrinsic with your compiler, and
strcmp works off the knowledge that one can compare multiple bytes at
a time before the end of the string. it may be faster for you to write
an inlined function that finds the first number in a string, then
strcmp the bytes previous to the numbers, and then do your inlined
compare of the numbers
Hmm...

I did think of doing something like that, but even though the example string
I gave above was "nice"... it isn't always going to be that way. Imagine if
you have something like "DVD-ISO9817-FULLIMAGE-1-07-2005" as an example. I'd
have to compare every string segment of the string seperately and keep track
of where I'm at. I thought it would be more overhead.

Hmm again... yeah, it looks like there is an intrinsic form of strcmp with
Visual Studio 2005, *BUT* intrinsic functions are disabled in debug mode.

Before intrinsics:
strcmp took 6688

StrCmpLogical took 139640

After intrinsics:

strcmp took 2188

StrCmpLogical took 139609

May 1 '07 #3
On Apr 30, 8:52 pm, "Somebody" <someb...@cox.n etwrote:
<cpun...@gmail. comwrote in message

news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
On Apr 30, 8:24 pm, "Somebody" <someb...@cox.n etwrote:
<snip>
the string library is probably intrinsic with your compiler, and
strcmp works off the knowledge that one can compare multiple bytes at
a time before the end of the string. it may be faster for you to write
an inlined function that finds the first number in a string, then
strcmp the bytes previous to the numbers, and then do your inlined
compare of the numbers

Hmm...

I did think of doing something like that, but even though the example string
I gave above was "nice"... it isn't always going to be that way. Imagine if
you have something like "DVD-ISO9817-FULLIMAGE-1-07-2005" as an example. I'd
have to compare every string segment of the string seperately and keep track
of where I'm at. I thought it would be more overhead.

Hmm again... yeah, it looks like there is an intrinsic form of strcmp with
Visual Studio 2005, *BUT* intrinsic functions are disabled in debug mode.

Before intrinsics:
strcmp took 6688

StrCmpLogical took 139640

After intrinsics:

strcmp took 2188

StrCmpLogical took 139609
hmmm, just judging from your example, it seems that your code is
significantly more complicated than strcmp, and hence *should* take
significantly longer. though i still cant explain the extra
overhead... ASM vs C/C++ calling convention, perhaps? try __fastcall?

May 1 '07 #4
Somebody wrote:
Hi,

I'm trying to write the function below and have it working, but I
benchmarked it against strcmp() and its much slower. My test is to compare 2
strings that are identitical 100,000,000 times. Yeah, thats a lot, but I
needed to scale up the test to get a real timing on the function. The weird
thing is, even when I comment out almost the entire function, its still much
slower then strcmp()... at full implementation, strcmp() takes 5 seconds and
my function takes 78 seconds. If I comment everything out in my function
except the main while loop, it still takes 13 seconds. WTH?!?! I *AM* in
debug mode, but so is the crt library.

Basically the goal of this function is to perform a LOGICAL string compare
vs. a textual one. This is also called a NATURAL string compare by some...

For example, a normal string compare will sort as follows:

string1
string10
string2

where as the natural or logical string compare will sort as follows:

string1
string2
string10

taking digits into account as numbers.

the strings I'm comparing are two copies of:

"Sample description [1/10]"

I tried swapping out isdigit() with a quick & dirty macro, and that sped it
up quite a bit, but 5 vs. 78 seconds seems far off. I understand my function
is doing a lot more then strcmp(), but I was expecting maybe 20 to 30
seconds for my function. Not 78 seconds.

P.S. the if (n1 == n2) {} portion of the code is to sort zero padded #'s
correctly... ie... 01 should appear before 1.

I also tried implementing it with strtol()... that allowed me to get rid of
the two while loops that go to the end of the number and some of the pointer
math, but strtol() was sooooo much slower.

--- code below ---
#define SCLF_IGNORECASE 0x00000001

#define DIGIT(x) (x >= _T('0') && x <= _T('9'))
//#define DIGIT(x) isdigit(x)

int __cdecl StrCmpLogical(L PCTSTR lpsz1, LPCTSTR lpsz2, DWORD dwFlags)
{
Can you post a standard C++ version?

--
Ian Collins.
May 1 '07 #5
Somebody skrev:
<cp*****@gmail. comwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
>On Apr 30, 8:24 pm, "Somebody" <someb...@cox.n etwrote:
<snip>
>the string library is probably intrinsic with your compiler, and
strcmp works off the knowledge that one can compare multiple bytes at
a time before the end of the string. it may be faster for you to write
an inlined function that finds the first number in a string, then
strcmp the bytes previous to the numbers, and then do your inlined
compare of the numbers

Hmm...

I did think of doing something like that, but even though the example string
I gave above was "nice"... it isn't always going to be that way. Imagine if
you have something like "DVD-ISO9817-FULLIMAGE-1-07-2005" as an example. I'd
have to compare every string segment of the string seperately and keep track
of where I'm at. I thought it would be more overhead.
What about:
(Written without enough debugging, but I expect it to work. Not benchmarked)

//---------------------------------------------------------------------------
#include <set>
#include <ostream>
#include <algorithm>
#include <iterator>

inline bool isd(char c) {
return (c >= '0') && (c <= '9');
}

int cmplogic(char const * a, char const * b) {
int result = 0;
bool ad,bd,ab,ob,pb = false;
while(*a && *b) {
ad = isd(*a);
bd = isd(*b);
ab = ad && bd;
ob = !ab && (ad || bd);
if(*a < *b) {
if(ab) { if(!result) result = -1; }
else if(pb && ob) return 1;
else if(pb && !ab) return result?result:-1;
else return -1;
} else
if(*a *b) {
if(ab) { if(!result) result = 1; }
else if(pb && ob) return -1;
else if(pb && !ab) return result?result:1 ;
else return 1;
} else
if(result) return result;
pb = ab;
++a;
++b;
}
if(!(*a || *b)) {
return result;
}
if(*a) {
if(isd(*a)) return 1;
return result?result:1 ;
}
if(isd(*b)) return -1;
return result?result:-1;
}

struct diff {
bool operator()(char const * a, char const * b) {
return cmplogic(a,b) == -1;
}
};

int main(int argc, char* argv[])
{
std::set<char const *,diffs;
s.insert("strin g11");
s.insert("strin g1");
s.insert("2u");
s.insert("963y" );
s.insert("963h" );
s.insert("strin g481");
s.insert("DVD-ISO9817-FULLIMAGE-1-08-2006");
s.insert("strin g23u4");
s.insert("strin g25");
s.insert("strin g10");
s.insert("41");
s.insert("strin g110");
s.insert("strin g23a");
s.insert("strin g2");
s.insert("strin g23u21");
s.insert("963") ;
s.insert("957") ;
s.insert("DVD-ISO9817-FULLIMAGE-1-07-2006");
s.insert("DVD-ISO9819-FULLIMAGE-2-07-2005");
std::copy(s.beg in(),s.end(),
std::ostream_it erator<char const*>(std::co ut,"\n"));
return 0;
}

//---------------------------------------------------------------------------

Outputs:

2u
41
957
963
963h
963y
DVD-ISO9817-FULLIMAGE-1-07-2006
DVD-ISO9817-FULLIMAGE-1-08-2006
DVD-ISO9819-FULLIMAGE-2-07-2005
string1
string10
string11
string23
string23a
string23u4
string23u21
string25
string110
string481

--
OU
May 1 '07 #6
On May 1, 3:24 pm, "Somebody" <someb...@cox.n etwrote:
I'm trying to write the function below and have it working, but I
benchmarked it against strcmp() and its much slower.
at full implementation, strcmp() takes 5 seconds and
my function takes 78 seconds. If I comment everything
out in my function except the main while loop, it still takes
13 seconds. WTH?!?!
Your function does a gajillion more things than strcmp, as
well as taking extra parameters and using a different calling
convention. Why are you surprised that it is slower?

May 1 '07 #7
It doesn't work actually :). It seems like you only look at one digit at a
time rather then the number as a whole...

It fails on:

String [1/10]
String [01/10]
String[10/10]
String [2/10]

But it was faster though... LOL...

Anyways, I got my working algorithm optimized down so that its as fast as
yours (but works :) )...

strcmp() = 36ms
my logical string compare = 175ms

This is about the timing I expected, not a MINUTE+ with my original
implementation.

I got it down this fast by:

1) writing a very small streamlined macro for "IsDigit()" . That chopped off
a SIGNIFICANT amount of time since its not an intrinsic function and the CRT
function (for VS2005) does a bunch of locale crap.

2) writing a very small streamlined INLINE block of code for atoi()... Yes,
it was copy & pasted twice since it would be easier to read :). We are only
talking about 4 lines here. This allowed me to combine the atoi() code and
the "find end of number" loops that followed. Another significant chunk of
time.

3) finally, I wrote a streamlined macro for tolower()... that had a big
effect on the case insensitive compares.

Calling conventions had almost zero effect on performance.
"Obnoxious User" <OU@127.0.0.1wr ote in message
news:46******** *************** @alt.teranews.c om...
Somebody skrev:
><cp*****@gmail .comwrote in message
news:11******* *************** @n76g2000hsh.go oglegroups.com. ..
>>On Apr 30, 8:24 pm, "Somebody" <someb...@cox.n etwrote:
<snip>
>>the string library is probably intrinsic with your compiler, and
strcmp works off the knowledge that one can compare multiple bytes at
a time before the end of the string. it may be faster for you to write
an inlined function that finds the first number in a string, then
strcmp the bytes previous to the numbers, and then do your inlined
compare of the numbers

Hmm...

I did think of doing something like that, but even though the example
string I gave above was "nice"... it isn't always going to be that way.
Imagine if you have something like "DVD-ISO9817-FULLIMAGE-1-07-2005" as
an example. I'd have to compare every string segment of the string
seperately and keep track of where I'm at. I thought it would be more
overhead.

What about:
(Written without enough debugging, but I expect it to work. Not
benchmarked)

//---------------------------------------------------------------------------
#include <set>
#include <ostream>
#include <algorithm>
#include <iterator>

inline bool isd(char c) {
return (c >= '0') && (c <= '9');
}

int cmplogic(char const * a, char const * b) {
int result = 0;
bool ad,bd,ab,ob,pb = false;
while(*a && *b) {
ad = isd(*a);
bd = isd(*b);
ab = ad && bd;
ob = !ab && (ad || bd);
if(*a < *b) {
if(ab) { if(!result) result = -1; }
else if(pb && ob) return 1;
else if(pb && !ab) return result?result:-1;
else return -1;
} else
if(*a *b) {
if(ab) { if(!result) result = 1; }
else if(pb && ob) return -1;
else if(pb && !ab) return result?result:1 ;
else return 1;
} else
if(result) return result;
pb = ab;
++a;
++b;
}
if(!(*a || *b)) {
return result;
}
if(*a) {
if(isd(*a)) return 1;
return result?result:1 ;
}
if(isd(*b)) return -1;
return result?result:-1;
}

struct diff {
bool operator()(char const * a, char const * b) {
return cmplogic(a,b) == -1;
}
};

int main(int argc, char* argv[])
{
std::set<char const *,diffs;
s.insert("strin g11");
s.insert("strin g1");
s.insert("2u");
s.insert("963y" );
s.insert("963h" );
s.insert("strin g481");
s.insert("DVD-ISO9817-FULLIMAGE-1-08-2006");
s.insert("strin g23u4");
s.insert("strin g25");
s.insert("strin g10");
s.insert("41");
s.insert("strin g110");
s.insert("strin g23a");
s.insert("strin g2");
s.insert("strin g23u21");
s.insert("963") ;
s.insert("957") ;
s.insert("DVD-ISO9817-FULLIMAGE-1-07-2006");
s.insert("DVD-ISO9819-FULLIMAGE-2-07-2005");
std::copy(s.beg in(),s.end(),
std::ostream_it erator<char const*>(std::co ut,"\n"));
return 0;
}

//---------------------------------------------------------------------------

Outputs:

2u
41
957
963
963h
963y
DVD-ISO9817-FULLIMAGE-1-07-2006
DVD-ISO9817-FULLIMAGE-1-08-2006
DVD-ISO9819-FULLIMAGE-2-07-2005
string1
string10
string11
string23
string23a
string23u4
string23u21
string25
string110
string481

--
OU

May 2 '07 #8
Somebody skrev:
It doesn't work actually :). It seems like you only look at one digit at a
time rather then the number as a whole...

It fails on:

String [1/10]
String [01/10]
String[10/10]
String [2/10]
No, it doesn't look at one digit at time. It considers the entire
number. Exactly how do you wish it to sort the strings? It outputs:

String [01/10]
String [1/10]
String [2/10]
String[10/10]

Precisely as I would expect it to do. 01 < 1 < 2.
When two numbers are found it compares the complete value.
>>
int cmplogic(char const * a, char const * b) {
int result = 0;
bool ad,bd,ab,ob,pb = false;
while(*a && *b) {
ad = isd(*a);
bd = isd(*b);
ab = ad && bd;
ob = !ab && (ad || bd);
if(*a < *b) {
if(ab) { if(!result) result = -1; }
else if(pb && ob) return 1;
else if(pb && !ab) return result?result:-1;
else return -1;
} else
if(*a *b) {
if(ab) { if(!result) result = 1; }
else if(pb && ob) return -1;
else if(pb && !ab) return result?result:1 ;
else return 1;
} else
if(result) return result;
pb = ab;
++a;
++b;
}
if(!(*a || *b)) {
return result;
}
if(*a) {
if(isd(*a)) return 1;
return result?result:1 ;
}
if(isd(*b)) return -1;
return result?result:-1;
}


--
OU
May 2 '07 #9
Obnoxious User skrev:
Somebody skrev:
>It doesn't work actually :). It seems like you only look at one digit
at a time rather then the number as a whole...

It fails on:

String [1/10]
String [01/10]
String[10/10]
String [2/10]

No, it doesn't look at one digit at time. It considers the entire
number. Exactly how do you wish it to sort the strings? It outputs:
Well, actually more likely just the partial number, but still enough
to know which number is bigger or smaller. The rest is irrelevant.

--
OU
May 2 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3139
by: Shay | last post by:
essentially I am trying to do some counts based on some assumptions in the recordset. So I get the RS back, put the values into a variable, move to the next record in the RS and compare what is in the variable to the value in the next record in the recordset and do a count. Then overwrite the value in the variables and do the same for the next record and so. But this runs extremly slow. 5000 records takes about 10 minutes in IE6 and I...
3
3073
by: Marie | last post by:
I'm a VB programmer that just inherited an ex-coworker's Access VBA program. It runs incredibly slow, and I'd like to speed it up, but I understand you can't just build an executable in Access like you can in VB. What are my options here? Build a VB front-end and make an executable from that? Thanks, marie
13
2138
by: dbuchanan | last post by:
This code resets a form with two cbo's (comboBoxes) and one datagrid. The first cbo (cboSelection) selects a main table and filters the second cbo. The second cbo (cboView) selects the secondary table which determine the dataAdapter used to fill the dataGrid. Both cbo's are populated by filling dataAdapters. This code just empty's the datagrid, cbo's and dataset so the user can start over to view another set of data. \\
10
2177
by: Extremest | last post by:
I know there are ways to make this a lot faster. Any newsreader does this in seconds. I don't know how they do it and I am very new to c#. If anyone knows a faster way please let me know. All I am doing is quering the db for all the headers for a certain group and then going through them to find all the parts of each post. I only want ones that are complete. Meaning all segments for that one file posted are there. using System;
6
2088
by: lawrence k | last post by:
The following function is way too slow. If anyone has any suggestions about how to speed it up, I'd be grateful for them. We have to call this function 36 times on one page, and I think each time it takes half a second, so it adds up to maybe 18 seconds, which is a lot when you're showing software to a client. The reponse we get is "Why is it so slow?" <?php
5
6836
by: howa | last post by:
will performance increae if I removed comments & space from source code using php -w ...? given that i don't need to modify the source code, & don't use any cache?
1
1787
by: SamSpide | last post by:
Hi all, I have a moderate-side 'Windows Form Application' (C++) project, with several forms. For some reason switching between code & designer views (right-click ;view code' or 'view designer') is very slow. How slow? It can take more than 10 seconds for a truely moderate-size form.
0
4439
by: Pratchaya | last post by:
In my.cnf i add these lines ####### log-bin log-slow-queries = /var/log/mysqld-slow.log long_query_time=1 #######
5
9969
by: =?Utf-8?B?QW5kcmV3IEhheWVz?= | last post by:
You've all seen them. Hoards of sites (predominantly ISP's) offering to test your bandwidth to the four corners of the globe, all trying to show that they are faster and you should switch to using them. Well, I now have a need to implement something similiar within my ASP.NET applications so that I can troubleshoot slow performance problems between our clients and our servers. An ActiveX control or Java Applet that the client can...
2
10907
by: mezise | last post by:
Posted by Pratchaya: ------------------------------------------------------ MySQL Slow Log ERROR In my.cnf i add these lines ####### log-bin log-slow-queries = /var/log/mysqld-slow.log
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.