no but seriously give me a language where a for loop looks likefor (i: u32 from 0 to 999) {
...
}and the semantics of the language mean, assuming you're compiling with avx512, that "i" becomes a 16-wide vector of u32s - 0 to 15 in the first iteration, 16 to 31 in the second, etc. except on the last iteration, which reduces the vector size and/or masks operations appropriately
and it's not just implicit. i is actually a vector of u32s here at the language level. you can get the length of i if you want to. all the operations you do apply to the whole vector by default. operation masks are a first class thing in the language so you can mask out certain elements for operations without having to use branching control flow. etc etc etc
Conversation
Notices
-
Embed this notice
linear cannon (linear@nya.social)'s status on Wednesday, 04-Oct-2023 04:04:00 JST linear cannon - Haelwenn /элвэн/ :triskell: likes this.
-
Embed this notice
linear cannon (linear@nya.social)'s status on Wednesday, 04-Oct-2023 04:04:03 JST linear cannon programming language that literally doesn't have a concept of scalar values and everything (yes everything) is a simd vector