Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: src/platform.h

Issue 12790012: Lower limit for complex memcpy on non-ia32 architectures. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 static void MemCopy(void* dest, const void* src, size_t size); 341 static void MemCopy(void* dest, const void* src, size_t size);
342 // Limit below which the extra overhead of the MemCopy function is likely 342 // Limit below which the extra overhead of the MemCopy function is likely
343 // to outweigh the benefits of faster copying. 343 // to outweigh the benefits of faster copying.
344 static const int kMinComplexMemCopy = 64; 344 static const int kMinComplexMemCopy = 64;
345 typedef void (*MemCopyFunction)(void* dest, const void* src, size_t size); 345 typedef void (*MemCopyFunction)(void* dest, const void* src, size_t size);
346 346
347 #else // V8_TARGET_ARCH_IA32 347 #else // V8_TARGET_ARCH_IA32
348 static void MemCopy(void* dest, const void* src, size_t size) { 348 static void MemCopy(void* dest, const void* src, size_t size) {
349 memcpy(dest, src, size); 349 memcpy(dest, src, size);
350 } 350 }
351 static const int kMinComplexMemCopy = 256; 351 static const int kMinComplexMemCopy = 16 * kPointerSize;
352 #endif // V8_TARGET_ARCH_IA32 352 #endif // V8_TARGET_ARCH_IA32
353 353
354 static int GetCurrentProcessId(); 354 static int GetCurrentProcessId();
355 355
356 private: 356 private:
357 static const int msPerSecond = 1000; 357 static const int msPerSecond = 1000;
358 358
359 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); 359 DISALLOW_IMPLICIT_CONSTRUCTORS(OS);
360 }; 360 };
361 361
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 Atomic32 active_; 798 Atomic32 active_;
799 PlatformData* data_; // Platform specific data. 799 PlatformData* data_; // Platform specific data.
800 int samples_taken_; // Counts stack samples taken. 800 int samples_taken_; // Counts stack samples taken.
801 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 801 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
802 }; 802 };
803 803
804 804
805 } } // namespace v8::internal 805 } } // namespace v8::internal
806 806
807 #endif // V8_PLATFORM_H_ 807 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698