[Pitch] fast/average/etc buffers and queues for swift

quick summary: im asking for a built in Buffer and Queue type, something fast, optimized, and cool

lets say im downloading a 200mb text file from a web site, I can set the socket buffer to either a fast buffer (using asm or I guess multithreading) or the standard lifo buffer, which is just a variable pointed at int

and yes I know some buffers and arrays (I think) are lifo already, but some optimization to a buffer type that makes it efficient and fast and capable on aarch64, also having a native queue or fancy buffer would be neat. just a suggestion

also a built in queue type would be cool, lets say I have another 500mb of text downloading, I could use a buffer in holding all the text but I can use a queue to possibly hold, sort, and execute any data using functions, never really used the queue package in swift

sorry if this sounds jumbled, its late

but If we use buffers/queues on apple software we have a chance of very fast efficient software

We have a Queue type called Deque in the swift-collections package which might be what you are looking for, at least partially: swift-collections/Documentation/Deque.md at main · apple/swift-collections · GitHub

1 Like

cool, deque could use the oop treatment ie protocols, inheritance, I think polymorphism

like, we can do something cool like

struct _video:lib.deqeue,libblueray{
protocol files
byte.queue
etc}

and do play_video(byte.queue.pop_first.blah())

maybe throw in some list magic

im a little rusty lol, what do you think?