TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

RoslynLinqRewrite – Compiles C# by rewriting and optimising LINQ expressions

76 pointsby Halienjaover 8 years ago

5 comments

mwshermanover 8 years ago
Looks nice. A lot of people don’t realize how expensive Linq can be. That said, my preference for most (source) codegen is in the editor – this would be nice as an editor plugin.
评论 #12545502 未加载
评论 #12545672 未加载
damiengover 8 years ago
Worth bearing in mind that this only helps if you are using LINQ against in-memory objects (i.e. LINQ to Objects). Depending on how this detects IQueryable providers it will either skip it, break it or worse of all silently 'work' but pull all the remote data into memory for evaluation. I'm hoping it's skip.
评论 #12547781 未加载
duanebover 8 years ago
Looks cool!<p>&gt; No support for F#<p>Why is this? Is it a macro (as opposed to working with bytecode directly)?
评论 #12545489 未加载
yreadover 8 years ago
It would be more interesting to apply it selectively to LINQ on hot code paths and keep LINQ&#x27;s readability where performance and allocations are not a concern
评论 #12546186 未加载
CurtHagenlocherover 8 years ago
If only C# had LISP-style macros... .