- Timestamp:
- May 1, 2023, 4:19:09 PM (20 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- c083c3d
- Parents:
- a50fdfb (diff), 985b624 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/mike_brooks_MMath/benchmarks/list/_classic.c
ra50fdfb r6e1e2d0 171 171 #endif 172 172 173 174 #define Repeat( op ) for ( volatile unsigned int i = 0; i < NoOfNodes; i += 1 ) { op; } 173 volatile unsigned int t = 0; 174 volatile unsigned int i_official = 0; 175 176 #define Repeat( op ) for ( unsigned int i = 0; (i_official = i, i < NoOfNodes); i += 1 ) { op; } 175 177 176 178 int main() { … … 192 194 TAILQ_INIT(&lst); 193 195 start = clock(); 194 for ( volatile unsigned intt = 0; t < Times; t += 1 ) {196 for ( t = 0; t < Times; t += 1 ) { 195 197 Repeat( TAILQ_INSERT_TAIL( &lst, &s[i], x ) ); 196 198 Repeat( TAILQ_REMOVE( &lst, TAILQ_FIRST( &lst ), x ) ); … … 204 206 std::list<S *> lst; 205 207 start = clock(); 206 for ( volatile unsigned intt = 0; t < Times; t += 1 ) {208 for ( t = 0; t < Times; t += 1 ) { 207 209 Repeat( lst.push_back( &s[i] ) ); 208 210 Repeat( lst.pop_front() ); … … 216 218 uSequence<S> lst; 217 219 start = clock(); 218 for ( volatile unsigned intt = 0; t < Times; t += 1 ) {220 for ( t = 0; t < Times; t += 1 ) { 219 221 Repeat( lst.addTail( &s[i] ) ); 220 222 Repeat( lst.dropHead() ); … … 228 230 dlist(S) lst; 229 231 start = clock(); 230 for ( volatile unsigned intt = 0; t < Times; t += 1 ) {232 for ( t = 0; t < Times; t += 1 ) { 231 233 Repeat( insert_last( lst, s[i] ) ); 232 234 Repeat( remove( lst`first ) ); … … 240 242 Sequence(S) lst; 241 243 start = clock(); 242 for ( volatile unsigned intt = 0; t < Times; t += 1 ) {244 for ( t = 0; t < Times; t += 1 ) { 243 245 Repeat( addHead( lst, s[i] ) ); 244 246 Repeat( dropTail( lst ) );
Note: See TracChangeset
for help on using the changeset viewer.