Timeline for JavaScript random BigInt
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 12 at 4:38 | vote | accept | Blindman67 | ||
| Jan 12 at 3:34 | comment | added | J_H | @Blindman67, When I write source code, I do it primarily to convey a technical idea to human collaborators, and only secondarily for the machine to expend cycles upon it. I think I start to see why there's just a subset of languages that I usually express my ideas in. If the compiler can't see through to my intent, then it's not my best medium for expression. // Similarly for tail-call optimization in scheme vs generic Common Lisp, or for the endless endian and bit-length changes in the various C specs. Perhaps TypeScript improves upon such idioms. | |
| Jan 12 at 3:26 | comment | added | Blindman67 |
Bitwise operators (under the hood) do a type conversion from double to int32 (aka int32_t). I see num | 0 in JS I think (std::int32_t)num C++/C. I'm not flooring, I am casting for performance (tc39.es/ecma262/multipage/… Spec returns a Number (double) engines defer cast to double saving significant number of cycles when using the internal int32 (mostly parameter type coercions via abstract operator calls (see; 7 Abstract Operations in spec Draft ECMA-262 Jan9,2025). 1,000,000,000 is < 2**31-1 (max int32 safe to cast)
|
|
| Jan 9 at 19:14 | history | edited | J_H | CC BY-SA 4.0 |
edited body
|
| Jan 9 at 19:07 | history | edited | J_H | CC BY-SA 4.0 |
added 299 characters in body
|
| Jan 9 at 19:00 | history | edited | J_H | CC BY-SA 4.0 |
added 299 characters in body
|
| Jan 9 at 18:50 | history | answered | J_H | CC BY-SA 4.0 |