diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-05-08 13:12:39 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-05-08 13:12:39 -0700 |
commit | 863f52e8048dc4fdfda2648c816b64394e143718 (patch) | |
tree | 41d87519d83883b23feaa55200bccc4c651becaa | |
parent | db2617ee10717b827f524647a37e5924a676017e (diff) | |
download | mu-863f52e8048dc4fdfda2648c816b64394e143718.tar.gz |
2937
-rw-r--r-- | 001help.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/001help.cc b/001help.cc index 06beab82..1b24f217 100644 --- a/001help.cc +++ b/001help.cc @@ -85,11 +85,14 @@ bool is_equal(char* s, const char* lit) { //: unsigned and that'll cause warnings about mixing signed and unsigned, //: yadda-yadda. Instead use this macro below to perform an unsafe cast to //: signed. We'll just give up immediately if a container's ever too large. -//: -//: Addendum to corollary: We're going to uniformly avoid long long int -//: everywhere, since Clang on 32-bit platforms doesn't yet support -//: multiplication over 64-bit integers, and since that seems like a more -//: common situation to end up in than integer overflow. +//: Basically, Mu is not concerned about this being a little slower than it +//: could be. (https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7) +//: +//: Addendum to corollary: We're going to uniformly use int everywhere, to +//: indicate that we're oblivious to number size, and since Clang on 32-bit +//: platforms doesn't yet support multiplication over 64-bit integers, and +//: since multiplying two integers seems like a more common situation to end +//: up in than integer overflow. :(before "End Includes") #define SIZE(X) (assert((X).size() < (1LL<<(sizeof(int)*8-2))), static_cast<int>((X).size())) //: |