this post was submitted on 24 Mar 2025
28 points (100.0% liked)

Game Development

4001 readers
4 users here now

Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.

Community Wiki

founded 2 years ago
MODERATORS
 

I've recently discovered this project, which assuming it works as advertised (which I think wasn't really tested yet, since it seems to be a pretty new repo) sounds like a pretty good library to add into your toolbox.

For those that do not know, LINQ is basically a query language over collections in C#, that allows you (from the top of my head) to do stuff like

someList.Where(x => x.value < 10).OrderBy(x => x.priority).Select(x => x.name)

which would give you a IEnumerable list with names of elements where value is smaller than 10, ordered by priority.

However, using LINQ in performance critical code, such as per-frame Updates, is not really a good idea because it unfortunately does generate a lot of garbage (allocations for GC to collect). Having a version that doesn't allocate anything sounds awesome, assuming you are a fan of LINQ.

What are your thoughts? For me, it sounds like something really useful. While it's not really that difficult to avoid LINQ, I'm a fan of the simplicity and descriptive nature of the syntax, and not having to avoid it would be great. It does seem there are quite a few issues starting to pop up, but it's definitely a project that could be worth it to follow.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 week ago (2 children)

It's/The technical readme desc is certainly interesting.

I'm using linq (to mssql) extensively at work. I also have parsing use cases where we work with spans.

I'll look more into this lib, keep it in mind, and potentially experiment with it.

[–] [email protected] 1 points 1 week ago (1 children)

If you're using Entity Framework for the mssql, I doubt that this library would work as a substitute.

Because that linq gets parsed into expression trees and then send to the underlying provider (mssql/mysql etc) to be converted into sql. So if you you some non-standard library those providers won't be able to convert that linq to sql

[–] [email protected] 1 points 6 days ago

Yeah, that was ma understanding/assessment as well. It could be useful for my other use case of reading from linear byte data spans though. I suspect the dependency overhead won't be worth for what it provides though when I can go over the span myself. We don't have many query-condition-like aspects to reading it.