@lorentey@mastodon.social
@lorentey@mastodon.social avatar

lorentey

@lorentey@mastodon.social

Swift Standard Library at Apple

he/him ๐Ÿณ๏ธโ€๐ŸŒˆ

This profile is from a federated server and may be incomplete. Browse more on the original instance.

ctietze, to random
@ctietze@mastodon.social avatar

@lorentey I read your 2021 forum post that a mutable SortedArray would be impractical after ~2000 items
https://forums.swift.org/t/add-sortedarray-sortedset-and-sorteddictionary-with-binary-search/47303/2

Is that because of resizing the array or the search that is required to look for a fitting index, or both?

Do you have benchmark code lying around by chance?

lorentey,
@lorentey@mastodon.social avatar

@ctietze This is primarily because insertions and removals have complexity thatโ€™s linear in the size of the array โ€” they have to slide existing items to make room for a new one or to close gaps after a removal.

Arrays have benefits on small sizes because they are compact. Beyond a couple thousands or so items, this advantage is entirely eclipsed by all these movement costs: they become unbearably slow.
[1/2]

lorentey, to random
@lorentey@mastodon.social avatar

A wild Swift evolution pitch appears! It overhauls some fundamental Standard Library constructs to allow building things using noncopyable types. It's super effective, I hope

https://forums.swift.org/t/pitch-noncopyable-standard-library-primitives/71566

lorentey, to random
@lorentey@mastodon.social avatar

Current status: sinking back into electronics to teach 3d printed things to move. Itโ€™s a hobbyception!

lorentey,
@lorentey@mastodon.social avatar

Itโ€™s alive! ๐Ÿ‘จ๐Ÿผโ€๐Ÿ”ฌ๐Ÿ”ฌ๐Ÿ”ญ

video/mp4

lorentey,
@lorentey@mastodon.social avatar

Cleaning up the ratโ€™s nest at the back will be a nice project for another day

video/mp4

lorentey,
@lorentey@mastodon.social avatar

@schwa Not that much โ€” IIRC about 4 days for the four digits! Lots of 2-hour prints, with a few 5-6 hour long ones sprinkled in

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • megavids
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • ngwrru68w68
  • JUstTest
  • cubers
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • lostlight
  • All magazines