fastgets.lsp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. %
  2. % fastgets.lsp Copyright (C) 1995-6 Codemist Ltd
  3. %
  4. (prog (how!-many w n)
  5. (setq how!-many 32)
  6. (symbol!-make!-fastget how!-many)
  7. % It is important that NONCOM is given the fastget tag zero, since that
  8. % number is hard coded into the Lisp kernel in "read.c"
  9. (symbol!-make!-fastget 'noncom 0)
  10. (symbol!-make!-fastget 'lose 1)
  11. % The following list gives property-list indicators in roughly the
  12. % order of priority across the whole range of REDUCE test files provided
  13. % with REDUCE 3.6. For each test the number of successful and unsuccessful
  14. % property-list accesses was counted. (S and F). The score S+2*F was used
  15. % to allow for failing accesses needing to scan all the list, while
  16. % successful ones only go on average half way. For each test scores for each
  17. % particular indicator were expressed as percentages. Tables of all these
  18. % percentages were put together and sorted - the list that follows is what
  19. % emerged when only the highest-placed mention of a tag was kept. The effect
  20. % should be that the most heavily used tags in each test come in this list.
  21. % This list can be longer than the number of fast-get tags I support and only
  22. % the relevant number of items on it will be used.
  23. (setq w '(
  24. convert rules field opmtch
  25. optional noncom rtype dname
  26. indexvar phystype oldnam opfn
  27. psopfn avalue share zerop
  28. prepfn2 newnam onep intequivfn
  29. trace polyfn symmetric binding
  30. nary ifdegree alt switch!*
  31. remember minusp modefn rtypefn
  32. infix tokprop full delchar
  33. class delim times pprifn
  34. spaced simpfn number!-of!-args stat
  35. plus i2d prifn idvalfn
  36. tag package!-name fkernfn !*decs!*
  37. difference rvalue tracing struct
  38. prtch kvalue mksqsubfn dfform
  39. noform subscripted switch mgen
  40. ))
  41. (setq n 2)
  42. top (cons ((equal n how!-many) (return nil)))
  43. (symbol!-make!-fastget (car w) n)
  44. (setq w (cdr w))
  45. (setq n (add1 n))
  46. (go top))
  47. % end of fastgets.lsp