fastgets.lsp 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. %
  2. % fastgets.lsp Copyright (C) 1995-9 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. %
  24. % At present I am assuming that the priority order will be roughly the
  25. % same for REDUCE 3.7
  26. %
  27. (setq w '(
  28. convert rules field opmtch
  29. optional noncom rtype dname
  30. indexvar phystype oldnam opfn
  31. psopfn avalue share zerop
  32. prepfn2 newnam onep intequivfn
  33. trace polyfn symmetric binding
  34. nary ifdegree alt switch!*
  35. remember minusp modefn rtypefn
  36. infix tokprop full delchar
  37. class delim times pprifn
  38. spaced simpfn number!-of!-args stat
  39. plus i2d prifn idvalfn
  40. tag package!-name fkernfn !*decs!*
  41. difference rvalue tracing struct
  42. prtch kvalue mksqsubfn dfform
  43. noform subscripted switch mgen
  44. ))
  45. (setq n 2)
  46. top (cons ((equal n how!-many) (return nil)))
  47. (symbol!-make!-fastget (car w) n)
  48. (setq w (cdr w))
  49. (setq n (add1 n))
  50. (go top))
  51. % end of fastgets.lsp