Re: How much faster is Proc{} bind def with 'bind' ?
- From: hoffmann@xxxxxxxxxxxx
- Date: 23 Nov 2005 22:28:51 -0800
Chap,
thanks for the feedback and the doc. Understanding this will take
longer.
Meanwhile I have replaced the logical structure in the kernel by
'bitshift'.
Surprisingly this doesn't speed up the algorithm considerably.
This leads again to the question 'which part in the interpreter
workflow consumes most of the time ?'
Best regards --Gernot Hoffmann
---------------------------------------------
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 731 731
%%Creator: Gernot Hoffmann
%%Title: Hilb01
%%CreationDate: November 24/2005
% Draw Hilbert-Peano Curve
% Modified algorithm, originally by Sei-ichiro Kamata, 1996
% Bounding box 258mm
/mm {2.834646 mul} def
0 0 0 1 setcmykcolor
true setstrokeadjust
2 setlinecap
/sx 1 mm def
1 mm 1 mm translate
sx sx scale
0.2 mm sx div setlinewidth
/DrawHilb
{/Tx [0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1] def
/Ty [0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 0] def
/Ti [4 0 0 12 0 4 4 8 12 8 8 4 8 12 12 0] def
/g8 0 def
/xo 0 def
/yo 0 def
4
{/x8 Tx g8 get def /y8 Ty g8 get def /g7 Ti g8 get def /g8 g8 1 add def
4
{/x7 Tx g7 get def /y7 Ty g7 get def /g6 Ti g7 get def /g7 g7 1 add def
4
{/x6 Tx g6 get def /y6 Ty g6 get def /g5 Ti g6 get def /g6 g6 1 add def
4
{/x5 Tx g5 get def /y5 Ty g5 get def /g4 Ti g5 get def /g5 g5 1 add def
4
{/x4 Tx g4 get def /y4 Ty g4 get def /g3 Ti g4 get def /g4 g4 1 add def
4
{/x3 Tx g3 get def /y3 Ty g3 get def /g2 Ti g3 get def /g3 g3 1 add def
4
{/x2 Tx g2 get def /y2 Ty g2 get def /g1 Ti g2 get def /g2 g2 1 add def
4
{/x1 Tx g1 get def /y1 Ty g1 get def /g1 g1 1 add def
/xn x1 x2 1 bitshift add x3 2 bitshift add
x4 3 bitshift add x5 4 bitshift add
x6 5 bitshift add x7 6 bitshift add
x8 7 bitshift add def
/yn y1 y2 1 bitshift add y3 2 bitshift add
y4 3 bitshift add y5 4 bitshift add
y6 5 bitshift add y7 6 bitshift add
y8 7 bitshift add def
xo yo moveto xn yn lineto stroke
/xo xn def
/yo yn def
} repeat % 1
} repeat % 2
} repeat % 3
} repeat % 4
} repeat % 5
} repeat % 6
} repeat % 7
} repeat % 8
} bind def
DrawHilb
showpage
-----------------------------------------
.
- Follow-Ups:
- Re: How much faster is Proc{} bind def with 'bind' ?
- From: François Robert
- Re: How much faster is Proc{} bind def with 'bind' ?
- References:
- How much faster is Proc{} bind def with 'bind' ?
- From: hoffmann
- Re: How much faster is Proc{} bind def with 'bind' ?
- From: Chapman Flack
- How much faster is Proc{} bind def with 'bind' ?
- Prev by Date: Re: Like to Use Windows 2000 fonts, but How?
- Next by Date: Re: How much faster is Proc{} bind def with 'bind' ?
- Previous by thread: Re: How much faster is Proc{} bind def with 'bind' ?
- Next by thread: Re: How much faster is Proc{} bind def with 'bind' ?
- Index(es):
Relevant Pages
|
Loading