(no title)
piyush_soni | 1 year ago
What annoys me greatly though is kids coding various 'fancy' functional paradigms for data transformation without realizing their performance implications, still thinking they've actually done the 'smarter' thing by transforming it multiple times and changing a simple loop to three or four loops. Example : Array.map.filter.map.reduce. Also when talked about it, they have learned to respond with another fancy term : "that would be premature optimization". :|
eigenspace|1 year ago
Of you work with transducers, the map filter map reduce is still just one single loop.
eru|1 year ago
GHC does for example.
davedx|1 year ago
kreyenborgi|1 year ago
https://stackoverflow.com/questions/38905369/what-is-fusion-...
DeathArrow|1 year ago
TeMPOraL|1 year ago
In other words, you need to know which things in your language are considered to be language/compiler/runtime primitives, and which are just regular code.
HdS84|1 year ago
Even in C# it depends on the linq provider - if you are talking to a DB, your quers should be optimized. Linq to objects doesn't do that and repeated scanning can kill your performance. E.g. repeated filtering on large lists.
high_na_euv|1 year ago
Gunax|1 year ago
piyush_soni|1 year ago
kosmozaut|1 year ago
piyush_soni|1 year ago
bluGill|1 year ago
sgarland|1 year ago
If compilers consistently did this, projects like ffmpeg wouldn’t need to sprinkle assembly into their code base. And yet.
djvuvtgcuehb|1 year ago
[deleted]