December 07, 2006

Julio César Carrascal Urquijo wrote:
> Hasan Aljudy wrote:
>> Pragma wrote:
>>> John Reimer wrote:
>  >>
>>> Now, if you want to see something *really slick* for commenting, take a look at JackSlocum's site:
>>>
>>> http://www.jackslocum.com/blog/2006/10/09/my-wordpress-comments-system-built-with-yahoo-ui-and-yahooext/ 
>>>
>>>
>>> It's pretty script-heavy, but it shows what can be done with AJAX and a solid widget set.  Be sure to check out the "Documentation" section too.
>>>
>>
>> That baby is too slow ... my FF2 had to suffer before opening it ..
> 
> The Django book has the same commenting system but it's a lot faster:
> 
> http://www.djangobook.com/en/beta/chapter14/

Wow! Amazing indeed!
Commenting on a specific block! Such a simple idea yet very original and I can assume it can prove to be very useful and convenient.

December 07, 2006
Hasan Aljudy wrote:
> 
> 
> Julio César Carrascal Urquijo wrote:
>> Hasan Aljudy wrote:
>>> Pragma wrote:
>>>> John Reimer wrote:
>>  >>
>>>> Now, if you want to see something *really slick* for commenting, take a look at JackSlocum's site:
>>>>
>>>> http://www.jackslocum.com/blog/2006/10/09/my-wordpress-comments-system-built-with-yahoo-ui-and-yahooext/ 
>>>>
>>>>
>>>> It's pretty script-heavy, but it shows what can be done with AJAX and a solid widget set.  Be sure to check out the "Documentation" section too.
>>>>
>>>
>>> That baby is too slow ... my FF2 had to suffer before opening it ..
>>
>> The Django book has the same commenting system but it's a lot faster:
>>
>> http://www.djangobook.com/en/beta/chapter14/
> 
> Wow! Amazing indeed!
> Commenting on a specific block! Such a simple idea yet very original and I can assume it can prove to be very useful and convenient.
> 

But I wonder what happens when the maintainers of the documentation want to make changes that move, split, merge, delete, and reorganize paragraphs.

--bb
December 07, 2006
zz wrote:
> 
> After fixing this problem here are my results on a different machine.
> 
>  From my point of view these tests are not really nessesary on my side since I still continue using D and I belive that someday the memory stuff will be optimized.
> 
> Zz
> 
> -------------------------------------------------------
> VS2003
> Element count: 1000000
> 
> ContextSwitches - 24787
> First level fills = 0
> Second level fills = 0
> 
> ETime(   0:00:05.328 ) UTime(   0:00:05.046 ) KTime(   0:00:00.187 )
> ITime(   0:00:04.828 )
> 
> -------------------------------------------------------
> VS2003 with nedmalloc
> Element count: 1000000
> 
> ContextSwitches - 8854
> First level fills = 0
> Second level fills = 0
> 
> ETime(   0:00:02.390 ) UTime(   0:00:02.218 ) KTime(   0:00:00.078 )
> ITime(   0:00:02.015 )
> 
> -------------------------------------------------------
> DMC
> Element count: 1000000
> 
> ContextSwitches - 35008
> First level fills = 0
> Second level fills = 0
> 
> ETime(   0:00:07.312 ) UTime(   0:00:07.000 ) KTime(   0:00:00.031 )
> ITime(   0:00:06.656 )
> 
> D change:
>     for(int i = 0; i < 1000000; i++)
>     {
>         d_element element = new d_element();
>         element.CreationDate = cd1 ~ "cd1";
>         element.Creator      = cd2 ~ "cd2";
>         element.Label        = cd3 ~ "cd3";
>         root.elements ~= element;
>     }
> 
> 

If the code is changed for both D and C++ to not cat the small strings:

    for(int i = 0; i < 1000000; i++)
    {
        d_element element = new d_element();
        element.CreationDate = cd1;// ~ "cd1";
        element.Creator      = cd2;// ~ "cd2";
        element.Label        = cd3;// ~ "cd3";
        root.elements ~= element;
    }

VC++: 2.609 (using NedAlloc)
DMD:  0.937

Pretty interesting. The opCatAssign seems very fast. opCat not.

Zz, I don't know how closely your test mimics the bottlenecks in your production code, but maybe if you could move things like that opCat out of loops in some cases, you'd get faster code than with ptr_vector<>?
December 07, 2006
Bill Baxter wrote:
> zz wrote:
>> Pragma wrote:
>>> zz wrote:
>>>
>>>
>>> While I'm no STL guru, I have to ask: which allocator were you using with ptr_vector?
>>>
>> For the first number we used VS2003 SMT CRT (Default allocator)
>> With the other test we used nedmalloc as the allocator (just over load new and delete in C++ (it's a c library).
>>
>> http://www.nedprod.com/programs/portable/nedmalloc/
>>
>> Zz
> 
> I was going to ask why he didn't compare his algorithm with dlmalloc, but I see it actually is based on dlmalloc.  So I wonder what exactly the differences is between this and dlmalloc.
> 
> Incidentally I know this guy from his posts on the FOX mailing lists. He's been working on this thing called Tn[1] for about 10 years.  He's either insane or brilliant I can't really tell.  :-) Read the description of "What is Tn" to see what I mean.
> 
> [1] http://www.nedprod.com/Tn/index.html
> 
> --bb

Wow, that's pretty neat.  I'm leaning more towards brilliance than insanity on this one.

For a solid baseline of insanity, please visit the Time Cube:

http://www.timecube.com/

(Warning: you'll go schizophrenic just *trying* to make sense that page.)

-- 
- EricAnderton at yahoo
December 07, 2006
Brad Anderson wrote:
> Julio César Carrascal Urquijo wrote:
>> Hasan Aljudy wrote:
>>> Pragma wrote:
>>>> John Reimer wrote:
>>>>
>>>> Now, if you want to see something *really slick* for commenting, take
>>>> a look at JackSlocum's site:
>>>>
>>>> http://www.jackslocum.com/blog/2006/10/09/my-wordpress-comments-system-built-with-yahoo-ui-and-yahooext/
>>>>
>>>>
>>>> It's pretty script-heavy, but it shows what can be done with AJAX and
>>>> a solid widget set.  Be sure to check out the "Documentation" section
>>>> too.
>>>>
>>> That baby is too slow ... my FF2 had to suffer before opening it ..
>> The Django book has the same commenting system but it's a lot faster:
>>
>> http://www.djangobook.com/en/beta/chapter14/
> 
> Wow, that is *really slick*

Amazingly, it's using the same codebase: YUI-ext!

- Eric

-- 
- EricAnderton at yahoo
December 07, 2006
Bill Baxter wrote:
> zz wrote:
>> Pragma wrote:
>>> zz wrote:
>>>
>>>
>>> While I'm no STL guru, I have to ask: which allocator were you using with ptr_vector?
>>>
>> For the first number we used VS2003 SMT CRT (Default allocator)
>> With the other test we used nedmalloc as the allocator (just over load new and delete in C++ (it's a c library).
>>
>> http://www.nedprod.com/programs/portable/nedmalloc/
>>
>> Zz
> 
> I was going to ask why he didn't compare his algorithm with dlmalloc, but I see it actually is based on dlmalloc.  So I wonder what exactly the differences is between this and dlmalloc.
> 
> Incidentally I know this guy from his posts on the FOX mailing lists. He's been working on this thing called Tn[1] for about 10 years.  He's either insane or brilliant I can't really tell.  :-) Read the description of "What is Tn" to see what I mean.
> 
> [1] http://www.nedprod.com/Tn/index.html
> 
> --bb

Wow, that's pretty neat.  I'm leaning more towards brilliance than
insanity on this one.

For a solid baseline of insanity, please visit the Time Cube:

http://www.timecube.com/

(Warning: you'll go schizophrenic just trying to make sense of that page.)

-- 
- EricAnderton at yahoo
December 07, 2006
Pragma wrote:
> For a solid baseline of insanity, please visit the Time Cube:
> 
> http://www.timecube.com/
> 
> (Warning: you'll go schizophrenic just trying to make sense of that page.)
> 

Mmmmm. It looks like the output of a Markov chain generator.
December 07, 2006
"Pragma" <ericanderton@yahoo.removeme.com> wrote in message news:el9b6l$khl$3@digitaldaemon.com...

> For a solid baseline of insanity, please visit the Time Cube:
>
> http://www.timecube.com/
>
> (Warning: you'll go schizophrenic just trying to make sense of that page.)

Wow...

This _has_ to have been the influence for this joke page: http://www.somethingawful.com/learning_triangle/index.htm

Unless, of course, there are more pages like it, which certainly wouldn't surprise me.


December 07, 2006
Jarrett Billingsley wrote:
> "Pragma" <ericanderton@yahoo.removeme.com> wrote in message news:el9b6l$khl$3@digitaldaemon.com...
> 
>> For a solid baseline of insanity, please visit the Time Cube:
>>
>> http://www.timecube.com/
>>
>> (Warning: you'll go schizophrenic just trying to make sense of that page.)
> 
> Wow...
> 
> This _has_ to have been the influence for this joke page: http://www.somethingawful.com/learning_triangle/index.htm
> 
> Unless, of course, there are more pages like it, which certainly wouldn't surprise me. 

More than you can count.  Here is a page with links to some of the classics:

http://www.f4.ca/crackpot/


Sean
December 07, 2006
zz wrote:
>  From my point of view these tests are not really nessesary on my side since I still continue using D and I belive that someday the memory stuff will be optimized.

One thing that is happening is that the C++ code allocates memory, it never frees it. The same with the D code.

What happens with a garbage collector is it gets new chunks of memory from the operating system as it needs it. But before it does, it runs a collection cycle.

So in the D version, it will be running probably several collection cycles (accomplishing nothing), while the C++ version does not. This will make the gc version slower.

To get better numbers, one can add calls to gc.disable() and gc.enable() to tell the gc that there is no point to running a collection cycle for this section of code.