Changeset 8cc234 in git
- Timestamp:
- Jan 6, 2010, 1:27:01 PM (13 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- a7a94edf0d03f2f4cedf69c0e3af1487f084ba10
- Parents:
- a38b95b9190fdc9786efb4c81bb4ac12ad0e7c84
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipid.cc
ra38b95 r8cc234 56 56 /*0 implementation*/ 57 57 58 #ifdef HAVE_IDI59 58 int iiS2I(const char *s) 60 59 { … … 75 74 return i; 76 75 } 77 #endif 76 78 77 idhdl idrec::get(const char * s, int lev) 79 78 { … … 84 83 int l; 85 84 const char *id; 86 #ifndef HAVE_IDI87 if (s[1]=='\0')88 {89 while (h!=NULL)90 {91 omCheckAddr(IDID(h));92 // =============================================================93 #if 094 // timings: ratchwum: 515 s, wilde13: 373 s, nepomuck: 267 s, lukas 863 s95 id=IDID(h);96 l=IDLEV(h);97 if ((l==0) && (*(short *)s==*(short *)id) && (0 == strcmp(s+1,id+1)))98 {99 found=h;100 }101 else if ((l==lev) && (*(short *)s==*(short *)id) && (0 == strcmp(s+1,id+1)))102 {103 return h;104 }105 #endif106 // =============================================================107 #if 0108 // timings: ratchwum: 515 s, wilde13: 398 s, nepomuck: 269 s, lukas 834 s109 id=IDID(h);110 if (*(short *)s==*(short *)id)111 {112 l=IDLEV(h);113 if ((l==0) && (0 == strcmp(s+1,id+1)))114 {115 found=h;116 }117 else if ((l==lev) && (0 == strcmp(s+1,id+1)))118 {119 return h;120 }121 }122 #endif123 // =============================================================124 #if 1125 // timings: ratchwum: 501 s, wilde13: 357 s, nepomuck: 267 s, lukas 816 s126 // timings bug4: ratchwum: s, wilde13: s, nepomuck: 379.74 s, lukas s127 l=IDLEV(h);128 if ((l==0)||(l==lev))129 {130 id=IDID(h);131 if (*s==*id)132 {133 if (id[1]=='\0') // we know: s[1]=='\0'134 {135 if (l==lev) return h;136 found=h;137 }138 }139 }140 #endif141 // =============================================================142 #if 0143 // timings: ratchwum: s, wilde13: s, nepomuck: s, lukas s144 // timings bug4: ratchwum: s, wilde13: s, nepomuck: s, lukas s145 l=IDLEV(h);146 if ((l==0)||(l==lev))147 {148 id=IDID(h);149 if (*(short *)s==*(short *)id)150 {151 if (l==lev) return h;152 found=h;153 }154 }155 #endif156 // =============================================================157 h = IDNEXT(h);158 }159 }160 else161 {162 while (h!=NULL)163 {164 omCheckAddr(IDID(h));165 // =============================================================166 #if 0167 // timings: ratchwum: 515 s, wilde13: 373 s, nepomuck: 267 s, lukas 863 s168 id=IDID(h);169 l=IDLEV(h);170 if ((l==0) && (*(short *)s==*(short *)id) && (0 == strcmp(s+1,id+1)))171 {172 found=h;173 }174 else if ((l==lev) && (*(short *)s==*(short *)id) && (0 == strcmp(s+1,id+1)))175 {176 return h;177 }178 #endif179 // =============================================================180 #if 0181 // timings: ratchwum: 515 s, wilde13: 398 s, nepomuck: 269 s, lukas 834 s182 id=IDID(h);183 if (*(short *)s==*(short *)id)184 {185 l=IDLEV(h);186 if ((l==0) && (0 == strcmp(s+1,id+1)))187 {188 found=h;189 }190 else if ((l==lev) && (0 == strcmp(s+1,id+1)))191 {192 return h;193 }194 }195 #endif196 // =============================================================197 #if 0198 // timings: ratchwum: 501 s, wilde13: 357 s, nepomuck: 267 s, lukas 816 s199 // timings bug4: ratchwum: s, wilde13: s, nepomuck: 379.74 s, lukas s200 l=IDLEV(h);201 if ((l==0)||(l==lev))202 {203 id=IDID(h);204 if (*(short *)s==*(short *)id)205 {206 if (0 == strcmp(s+1,id+1))207 {208 if (l==lev) return h;209 found=h;210 }211 }212 }213 #endif214 // =============================================================215 #if 1216 // timings: ratchwum: s, wilde13: s, nepomuck: s, lukas s217 // timings bug4: ratchwum: s, wilde13: s, nepomuck: s, lukas s218 l=IDLEV(h);219 if ((l==0)||(l==lev))220 {221 id=IDID(h);222 if (*(short *)s==*(short *)id)223 {224 if (0 == strcmp(s+1,id+1))225 {226 if (l==lev) return h;227 found=h;228 }229 }230 }231 #endif232 // =============================================================233 h = IDNEXT(h);234 }235 }236 return found;237 #else238 85 int i=iiS2I(s); 239 86 int less4=(i < (1<<24)); … … 257 104 } 258 105 return found; 259 #endif260 106 } 261 107 … … 279 125 IDLEV(h) = lev; 280 126 IDNEXT(h) = this; 281 #ifdef HAVE_IDI282 127 h->id_i=iiS2I(s); 283 #endif284 128 if (init) 285 129 { -
Singular/mpsr_Get.h
ra38b95 r8cc234 111 111 IDTYP(h) = tok; 112 112 IDDATA(h) = (char *) data; 113 #ifdef HAVE_IDI114 113 extern int iiS2I(const char *s); 115 114 h->id_i=iiS2I(name); 116 #endif117 115 return h; 118 116 }
Note: See TracChangeset
for help on using the changeset viewer.