Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: d_speedopt.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
4 | ?RCS: | |
5 | ?RCS: You may redistribute only under the terms of the Artistic Licence, | |
6 | ?RCS: as specified in the README file that comes with the distribution. | |
7 | ?RCS: You may reuse parts of this distribution only within the terms of | |
8 | ?RCS: that same Artistic Licence; a copy of which may be found at the root | |
9 | ?RCS: of the source tree for dist 4.0. | |
10 | ?RCS: | |
11 | ?RCS: $Log: d_speedopt.U,v $ | |
12 | ?RCS: Revision 3.0.1.1 1994/10/29 16:15:51 ram | |
13 | ?RCS: patch36: call ./Cppsym explicitly instead of relying on PATH | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0 1993/08/18 12:07:27 ram | |
16 | ?RCS: Baseline for dist 3.0 netwide release. | |
17 | ?RCS: | |
18 | ?MAKE:d_speedopt: Myread Cppsym Oldconfig cat models Setvar | |
19 | ?MAKE: -pick add $@ %< | |
20 | ?S:d_speedopt: | |
21 | ?S: This variable conditionally defines the SPEED_OVER_MEM symbol, which | |
22 | ?S: indicates to the C program that it can burn memory in order to save | |
23 | ?S: CPU time. | |
24 | ?S:. | |
25 | ?C:SPEED_OVER_MEM (SPEEDOVERMEM): | |
26 | ?C: This symbol, if defined, indicates that the program can use more | |
27 | ?C: memory in order to reduce CPU time. The symbol doesn't say whether | |
28 | ?C: we are more interested in saving text space or data space. | |
29 | ?C:. | |
30 | ?H:#$d_speedopt SPEED_OVER_MEM /**/ | |
31 | ?H:. | |
32 | ?LINT:set d_speedopt | |
33 | : do we want speed at the expense of memory | |
34 | $cat <<'EOM' | |
35 | ||
36 | I can try to optimize this package for either speed or memory. If you have | |
37 | limited address space you may wish to optimize for memory. Otherwise you | |
38 | should probably optimize for speed. | |
39 | ||
40 | EOM | |
41 | case "$d_speedopt" in | |
42 | '') if ./Cppsym $smallmach; then | |
43 | case "$models" in | |
44 | *large*|*huge*) dflt=speed;; | |
45 | *) dflt=memory;; | |
46 | esac | |
47 | else | |
48 | dflt=speed | |
49 | fi | |
50 | ;; | |
51 | *define*) dflt=speed;; | |
52 | *) dflt=memory;; | |
53 | esac | |
54 | rp="What to optimize for?" | |
55 | . ./myread | |
56 | case "$ans" in | |
57 | mem*) val="$undef";; | |
58 | *) val="$define";; | |
59 | esac | |
60 | set d_speedopt | |
61 | eval $setvar | |
62 |