Improve /drawcopy on same source/dest - 27/03/20 01:13 PM
When I compare the time it takes for:
/drawcopy @source 0 0 400 400 @dest 0 0
and
/drawcopy @dest 0 0 400 400 @dest 0 0
I get extremely slow result when the source equals the destination. Here is the test for different source and destination:
I get 1779 ticks. With same source/dest:
I get 6287 ticks.
I believe that it should not matter if the source is the same as the destination, it should be the same copy of a buffer, so the same speed, if anything it should be faster because there are less ressources being used
I think that drawcopy can be improved in speed when source = destination, if you could please take a look at it
/drawcopy @source 0 0 400 400 @dest 0 0
and
/drawcopy @dest 0 0 400 400 @dest 0 0
I get extremely slow result when the source equals the destination. Here is the test for different source and destination:
Quote
//window -pdfh @test -1 -1 400 400 | window -pdfh @test1 -1 -1 400 400 | var %a 10000,%t $ticks | while (%a) { drawcopy @test1 0 0 400 400 @test 0 0 | dec %a } | echo -a $calc($ticks - %t) | close -@ @test*
Quote
//window -pdfh @test -1 -1 400 400 | window -pdfh @test1 -1 -1 400 400 | var %a 10000,%t $ticks | while (%a) { drawcopy @test 0 0 400 400 @test 0 0 | dec %a } | echo -a $calc($ticks - %t) | close -@ @test*
I believe that it should not matter if the source is the same as the destination, it should be the same copy of a buffer, so the same speed, if anything it should be faster because there are less ressources being used
I think that drawcopy can be improved in speed when source = destination, if you could please take a look at it