Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #21381 > unrolled thread
| Started by | jacob navia <jacob@spamsink.net> |
|---|---|
| First post | 2012-05-27 00:22 +0200 |
| Last post | 2012-05-29 01:40 -0600 |
| Articles | 10 on this page of 50 — 14 participants |
Back to article view | Back to comp.lang.c
Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-27 00:22 +0200
Re: Open letter to Ian Collins Ike Naar <ike@sverige.freeshell.org> - 2012-05-26 22:36 +0000
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-27 01:13 +0200
Re: Open letter to Ian Collins Barry Schwarz <schwarzb@dqel.com> - 2012-05-26 16:53 -0700
Re: Open letter to Ian Collins Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-05-26 16:41 -0700
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-05-26 22:43 -0400
Re: Open letter to Ian Collins Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-05-26 15:41 -0700
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-27 01:14 +0200
Re: Open letter to Ian Collins MelissA <melis@a.com> - 2012-05-27 00:52 +0200
Re: Open letter to Ian Collins Stephen Sprunk <stephen@sprunk.org> - 2012-05-26 20:40 -0500
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-27 09:32 +0200
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-05-27 07:18 -0400
Re: Open letter to Ian Collins Ian Collins <ian-news@hotmail.com> - 2012-05-27 14:24 +1200
Re: Open letter to Ian Collins "BartC" <bc@freeuk.com> - 2012-05-27 10:36 +0100
Re: Open letter to Ian Collins Ian Collins <ian-news@hotmail.com> - 2012-05-27 22:33 +1200
Re: Open letter to Ian Collins "BartC" <bc@freeuk.com> - 2012-05-27 12:25 +0100
Re: Open letter to Ian Collins Ian Collins <ian-news@hotmail.com> - 2012-05-28 07:17 +1200
Re: Open letter to Ian Collins Ike Naar <ike@sverige.freeshell.org> - 2012-05-27 13:03 +0000
Re: Open letter to Ian Collins Ian Collins <ian-news@hotmail.com> - 2012-05-27 15:16 +1200
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-27 09:30 +0200
Re: Open letter to Ian Collins Ian Collins <ian-news@hotmail.com> - 2012-05-27 20:56 +1200
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-27 11:12 +0200
Re: Open letter to Ian Collins Ian Collins <ian-news@hotmail.com> - 2012-05-27 21:22 +1200
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-05-27 07:15 -0400
Re: Open letter to Ian Collins Keith Thompson <kst-u@mib.org> - 2012-05-27 07:49 -0700
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-05-27 13:55 -0400
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-27 22:24 +0200
Re: Open letter to Ian Collins "BartC" <bc@freeuk.com> - 2012-05-27 22:09 +0100
Re: Open letter to Ian Collins Keith Thompson <kst-u@mib.org> - 2012-05-27 14:33 -0700
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-05-27 17:49 -0400
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-05-27 17:31 -0400
Re: Open letter to Ian Collins Philip Lantz <prl@canterey.us> - 2012-05-28 01:38 -0700
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-05-28 08:18 -0400
Re: Open letter to Ian Collins "BartC" <bc@freeuk.com> - 2012-05-27 15:46 +0100
Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-06-13 21:25 -0400
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-06-13 21:52 -0400
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-06-14 04:00 +0200
Re: Open letter to Ian Collins pete <pfiland@mindspring.com> - 2012-06-14 00:04 -0400
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-27 09:42 +0200
Re: Open letter to Ian Collins "io_x" <a@b.c.invalid> - 2012-05-28 12:39 +0200
Re: Open letter to Ian Collins "io_x" <a@b.c.invalid> - 2012-05-28 21:44 +0200
Re: Open letter to Ian Collins jacob navia <jacob@spamsink.net> - 2012-05-29 09:46 +0200
Re: Open letter to Ian Collins "io_x" <a@b.c.invalid> - 2012-05-29 10:06 +0200
Re: Open letter to Ian Collins "io_x" <a@b.c.invalid> - 2012-05-29 10:37 +0200
Re: Open letter to Ian Collins "io_x" <a@b.c.invalid> - 2012-05-29 10:58 +0200
Re: Open letter to Ian Collins "Joachim Schmitz" <nospam.jojo@schmitz-digital.de> - 2012-05-29 11:34 +0200
Re: Open letter to Ian Collins Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-05-29 03:02 -0700
Re: Open letter to Ian Collins "io_x" <a@b.c.invalid> - 2012-05-29 09:59 +0200
Re: Open letter to Ian Collins "io_x" <a@b.c.invalid> - 2012-05-29 20:09 +0200
Re: Open letter to Ian Collins "Sarah Wren" <swreb@ameritech.net> - 2012-05-29 01:40 -0600
Page 3 of 3 — ← Prev page 1 2 [3]
| From | "io_x" <a@b.c.invalid> |
|---|---|
| Date | 2012-05-28 21:44 +0200 |
| Message-ID | <4fc3d459$0$1375$4fafbaef@reader2.news.tin.it> |
| In reply to | #21460 |
"io_x" <a@b.c.invalid> ha scritto nel messaggio
news:4fc354b3$0$1390$4fafbaef@reader2.news.tin.it...
>
> "jacob navia" <jacob@spamsink.net> ha scritto nel messaggio
> news:jprl29$ifd$1@speranza.aioe.org...
>> Hi Ian
>>
>> In the c++ newsgroup you asked me for an example of the ccl performance
>> It was something with building a huge list, then sorting it, if I remember
>> correctly...
>>
>> I have built this example code:
>>
>> #include <stdlib.h>
>> #include "containers.h"
>> #define N 10000000
>> int main(void)
>> {
>> List *L1;
>> size_t i,d;
>> long long sum=0,newSum=0;
>> Iterator *it;
>> int *pint;
>>
>> L1 = iList.Create(sizeof(int));
>
>
> the size of the element of the struct is not enought
> for descrive one type in C ...
> the above could be ok for type dipend only by the size...
>
> i think for 'descrive' the type object one has need
> 3 C functions at last: one constructor, one destructor
> one copy function... :)
> Buon Giorno
#define N 10_000_000
in your pc; here with my little pc, and with my implementation
of list
is too much for me... i get a result only until N=190_000
because if more big, it would
be Malloc_m return 0 in the first loop ...
int testList2(void)
{u32 lista[2]={0}, i, j, r, cr, x;
u8 *pr;
x=Rand_m(); P("x=%u\n", x);
F(i=1, cr=0; i<190000; ++i)
{x=Rand_m();
r=List2PushH(lista, x); cr+=(r==-1);
if(i%100==0 && cr!=0)
{ex: List2Free(lista); R -1;}
}
F(pr=0, x=0; (r=List2Next(lista, &pr))!=1; )
{if(r==-1) G ex;
x+=List2elm(pr);
}
P("\nSomma x=%u\n", x);
if(List2Sortu32(lista)==-1) G ex;
F(pr=0, x=0; (r=List2Next(lista, &pr))!=1; )
{if(r==-1) G ex;
x+=List2elm(pr);
}
P("\nSomma x=%u cr=%u\n", x, cr);
P("\n");List2Free(lista); R 0;
}
[toc] | [prev] | [next] | [standalone]
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Date | 2012-05-29 09:46 +0200 |
| Message-ID | <jq1usk$92r$1@speranza.aioe.org> |
| In reply to | #21481 |
Le 28/05/12 21:44, io_x a écrit : > #define N 10_000_000 > in your pc; here with my little pc, and with my implementation > of list > is too much for me... i get a result only until N=190_000 > because if more big, it would > be Malloc_m return 0 in the first loop ... Did the library catch correctly the error? Thanks
[toc] | [prev] | [next] | [standalone]
| From | "io_x" <a@b.c.invalid> |
|---|---|
| Date | 2012-05-29 10:06 +0200 |
| Message-ID | <4fc48250$0$1374$4fafbaef@reader1.news.tin.it> |
| In reply to | #21495 |
"jacob navia" <jacob@spamsink.net> ha scritto nel messaggio news:jq1usk$92r$1@speranza.aioe.org... > Le 28/05/12 21:44, io_x a écrit : >> #define N 10_000_000 >> in your pc; here with my little pc, and with my implementation >> of list >> is too much for me... i get a result only until N=190_000 >> because if more big, it would >> be Malloc_m return 0 in the first loop ... > > Did the library catch correctly the error? > > Thanks it depend of what error you seek... do you want check if all the list -> pointer to next and prec are right? do you want to know if someone write all the node for some error? than some error can be erased if one write the right functions and only these write nodes and elements... but i'm not one expert... i can say what i seen... Buona Giornata...
[toc] | [prev] | [next] | [standalone]
| From | "io_x" <a@b.c.invalid> |
|---|---|
| Date | 2012-05-29 10:37 +0200 |
| Message-ID | <4fc489a7$0$1386$4fafbaef@reader1.news.tin.it> |
| In reply to | #21500 |
"io_x" <a@b.c.invalid> ha scritto nel messaggio news:4fc48250$0$1374$4fafbaef@reader1.news.tin.it... > > "jacob navia" <jacob@spamsink.net> ha scritto nel messaggio > news:jq1usk$92r$1@speranza.aioe.org... >> Le 28/05/12 21:44, io_x a écrit : >>> #define N 10_000_000 >>> in your pc; here with my little pc, and with my implementation >>> of list >>> is too much for me... i get a result only until N=190_000 >>> because if more big, it would >>> be Malloc_m return 0 in the first loop ... >> >> Did the library catch correctly the error? pheraps you say what if malloc return 0? than List2Push return -1, List2freeA is call on list, some memory check on free... the function return -1, see if some leak, return to OS no other problem... >> Thanks > > it depend of what error you seek... > do you want check if all the list -> pointer to next and prec are > right? do you want to know if someone write all the node > for some error? > > than some error can be erased if one write the right > functions and only these write nodes and elements... > > but i'm not one expert... i can say what i seen... > Buona Giornata... > >
[toc] | [prev] | [next] | [standalone]
| From | "io_x" <a@b.c.invalid> |
|---|---|
| Date | 2012-05-29 10:58 +0200 |
| Message-ID | <4fc48e8b$0$1384$4fafbaef@reader2.news.tin.it> |
| In reply to | #21502 |
"io_x" <a@b.c.invalid> ha scritto nel messaggio news:4fc489a7$0$1386$4fafbaef@reader1.news.tin.it... >> than some error can be erased if one write the right >> functions and only these write nodes and elements... "nodes" in my little english dictionary not exist pehraps better "knots" >> but i'm not one expert... i can say what i seen... >> Buona Giornata...
[toc] | [prev] | [next] | [standalone]
| From | "Joachim Schmitz" <nospam.jojo@schmitz-digital.de> |
|---|---|
| Date | 2012-05-29 11:34 +0200 |
| Message-ID | <jq2588$3li$1@online.de> |
| In reply to | #21503 |
io_x wrote: > "io_x" <a@b.c.invalid> ha scritto nel messaggio > news:4fc489a7$0$1386$4fafbaef@reader1.news.tin.it... >>> than some error can be erased if one write the right >>> functions and only these write nodes and elements... > > "nodes" in my little english dictionary not exist > pehraps better "knots" I guess it is "punto nodale" >>> but i'm not one expert... i can say what i seen... >>> Buona Giornata...
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2012-05-29 03:02 -0700 |
| Message-ID | <5f337b42-218a-4902-98e7-cdccfeac84d5@googlegroups.com> |
| In reply to | #21503 |
בתאריך יום שלישי, 29 במאי 2012 09:58:50 UTC+1, מאת io_x: > > "nodes" in my little english dictionary not exist > pehraps better "knots" > The words have the same root, but now they mean different things.
[toc] | [prev] | [next] | [standalone]
| From | "io_x" <a@b.c.invalid> |
|---|---|
| Date | 2012-05-29 09:59 +0200 |
| Message-ID | <4fc480a3$0$1381$4fafbaef@reader1.news.tin.it> |
| In reply to | #21481 |
"io_x" <a@b.c.invalid> ha scritto nel messaggio
news:4fc3d459$0$1375$4fafbaef@reader2.news.tin.it...
>
> "io_x" <a@b.c.invalid> ha scritto nel messaggio
> news:4fc354b3$0$1390$4fafbaef@reader2.news.tin.it...
>>
>> "jacob navia" <jacob@spamsink.net> ha scritto nel messaggio
>> news:jprl29$ifd$1@speranza.aioe.org...
>>> Hi Ian
>>>
>>> In the c++ newsgroup you asked me for an example of the ccl performance
>>> It was something with building a huge list, then sorting it, if I remember
>>> correctly...
>>>
>>> I have built this example code:
>>>
>>> #include <stdlib.h>
>>> #include "containers.h"
>>> #define N 10000000
>>> int main(void)
>>> {
>>> List *L1;
>>> size_t i,d;
>>> long long sum=0,newSum=0;
>>> Iterator *it;
>>> int *pint;
>>>
>>> L1 = iList.Create(sizeof(int));
>>
>>
>> the size of the element of the struct is not enought
>> for descrive one type in C ...
>> the above could be ok for type dipend only by the size...
>>
>> i think for 'descrive' the type object one has need
>> 3 C functions at last: one constructor, one destructor
>> one copy function... :)
>> Buon Giorno
>
>
> #define N 10_000_000
> in your pc; here with my little pc, and with my implementation
> of list
> is too much for me... i get a result only until N=190_000
there is an implementation limit of number of different mem
region returned from the malloc function i use...
i grow the limit until 800000 so here seems ok for
N=700_000 more than 10 time less of 10_000_000...
but i'm happy so, i not like mem limits
if someone reach them there is something wrong
for definition.
> because if more big, it would
> be Malloc_m return 0 in the first loop ...
>
> int testList2(void)
> {u32 lista[2]={0}, i, j, r, cr, x;
> u8 *pr;
>
> x=Rand_m(); P("x=%u\n", x);
> F(i=1, cr=0; i<190000; ++i)
> {x=Rand_m();
> r=List2PushH(lista, x); cr+=(r==-1);
> if(i%100==0 && cr!=0)
> {ex: List2Free(lista); R -1;}
> }
> F(pr=0, x=0; (r=List2Next(lista, &pr))!=1; )
> {if(r==-1) G ex;
> x+=List2elm(pr);
> }
> P("\nSomma x=%u\n", x);
> if(List2Sortu32(lista)==-1) G ex;
> F(pr=0, x=0; (r=List2Next(lista, &pr))!=1; )
> {if(r==-1) G ex;
> x+=List2elm(pr);
> }
> P("\nSomma x=%u cr=%u\n", x, cr);
> P("\n");List2Free(lista); R 0;
> }
Is it that very good? :)
[toc] | [prev] | [next] | [standalone]
| From | "io_x" <a@b.c.invalid> |
|---|---|
| Date | 2012-05-29 20:09 +0200 |
| Message-ID | <4fc50f87$0$1385$4fafbaef@reader2.news.tin.it> |
| In reply to | #21481 |
"io_x" <a@b.c.invalid> ha scritto nel messaggio
news:4fc3d459$0$1375$4fafbaef@reader2.news.tin.it...
> int testList2(void)
> {u32 lista[2]={0}, i, j, r, cr, x;
> u8 *pr;
>
> x=Rand_m(); P("x=%u\n", x);
> F(i=1, cr=0; i<190000; ++i)
> {x=Rand_m();
> r=List2PushH(lista, x); cr+=(r==-1);
> if(i%100==0 && cr!=0)
> {ex: List2Free(lista); R -1;}
> }
yes there is at last one error here:
if(cr!=0) G ex;
if(cr!=0) goto ex;
so i were lucky when the program exit with error of function
> F(pr=0, x=0; (r=List2Next(lista, &pr))!=1; )
> {if(r==-1) G ex;
> x+=List2elm(pr);
> }
> P("\nSomma x=%u\n", x);
> if(List2Sortu32(lista)==-1) G ex;
> F(pr=0, x=0; (r=List2Next(lista, &pr))!=1; )
> {if(r==-1) G ex;
> x+=List2elm(pr);
> }
> P("\nSomma x=%u cr=%u\n", x, cr);
and not to see here print cr>=1
> P("\n");List2Free(lista); R 0;
> }
>
>
>
[toc] | [prev] | [next] | [standalone]
| From | "Sarah Wren" <swreb@ameritech.net> |
|---|---|
| Date | 2012-05-29 01:40 -0600 |
| Message-ID | <jq1u7k$81k$2@speranza.aioe.org> |
| In reply to | #21381 |
"jacob navia" <jacob@spamsink.net> wrote in message news:jprl29$ifd$1@speranza.aioe.org... > Hi Ian > Are you not ashamed of yourself for asking what you are asking (you've a history here, not just the one proverbial question)? At some point, you'll become as wise as me, and I'll become as old as you. To note, I am older and you are just taking your toys apart and figuring them out. Hmm?
[toc] | [prev] | [standalone]
Page 3 of 3 — ← Prev page 1 2 [3]
Back to top | Article view | comp.lang.c
csiph-web