▲ 60 ▼ Ranking programming languages by energy efficiency (2021) (www.sciencedirect.com) submitted 1 year ago by pylapp@programming.dev to c/programming@programming.dev 32 comments fedilink hide all child comments A bit old but still interesting
[–] FizzyOrange@programming.dev 5 points 1 year ago (1 child) Stop linking this, please! Any benchmark where Typescript and JavaScript are different is trash. permalink fedilink source hideshow 2 child comments replies: [–] kureta@lemmy.ml 3 points 1 year ago (1 child) Why? Typescript transpiles into js but maybe the transpiler intruduces some overhead, isn't it possible? I am not familiar with these languages, so this is an honest question. permalink fedilink source parent hideshow 2 child comments replies: [–] FizzyOrange@programming.dev 7 points 1 year ago (1 child) It's barely transpiled. There are a couple of features that involve actual code generation - enums and namespaces (which are almost never used), but the vast majority of it is just stripping the type annotations so the performance will be 100% identical. It's like having "Python" and "Python with type hints" as separate languages and claiming there is a big speed difference between them. permalink fedilink source parent hideshow 2 child comments replies: [–] MinekPo1@lemmygrad.ml 1 point 1 year ago (1 child) I was originally going to comment that differences in performance between JS and TS appear to be most significant in one challenge ascii table about that, not screen reader friendly ___________________________________________________________________________________________________________________ |lang|_binary_trees___________|_fannkuch-redux_____________|_fasta_____________________|_normalized_________________| | JS | 312.14 : 21.349 : 916 | 413.90 : 33.663 : 26 | 64.84 : 5.098 : 30 | 4.45 : 6.52 : 4.59 | |_TS_|_315.10_:_21.686_:__915_|__6 898.48_:___516.541_:_26_|__82.72_:__6.909_:_____271_|____21.50_:___46.20_:__4.69_| |diff|___+.9%_:__+1.6%_:_+.1%_|_+15_66.7%_:_+14_34.4%_:_0%_|_+21.6%_:_+35.5%_:_+803.3%_|_+3_83.1%_:_+6_08.5_:_+8.1%_| however, trying to look to see the typescript code, wanting to translate that to type hinted python code, I've been unable to find typescript on CLBG, so I'm confused on how they got that data, permalink fedilink source parent hideshow 2 child comments replies: [–] FizzyOrange@programming.dev 2 points 1 year ago They used to have Typescript. Looks like they removed it at some point. permalink fedilink source parent
[–] kureta@lemmy.ml 3 points 1 year ago (1 child) Why? Typescript transpiles into js but maybe the transpiler intruduces some overhead, isn't it possible? I am not familiar with these languages, so this is an honest question. permalink fedilink source parent hideshow 2 child comments replies: [–] FizzyOrange@programming.dev 7 points 1 year ago (1 child) It's barely transpiled. There are a couple of features that involve actual code generation - enums and namespaces (which are almost never used), but the vast majority of it is just stripping the type annotations so the performance will be 100% identical. It's like having "Python" and "Python with type hints" as separate languages and claiming there is a big speed difference between them. permalink fedilink source parent hideshow 2 child comments replies: [–] MinekPo1@lemmygrad.ml 1 point 1 year ago (1 child) I was originally going to comment that differences in performance between JS and TS appear to be most significant in one challenge ascii table about that, not screen reader friendly ___________________________________________________________________________________________________________________ |lang|_binary_trees___________|_fannkuch-redux_____________|_fasta_____________________|_normalized_________________| | JS | 312.14 : 21.349 : 916 | 413.90 : 33.663 : 26 | 64.84 : 5.098 : 30 | 4.45 : 6.52 : 4.59 | |_TS_|_315.10_:_21.686_:__915_|__6 898.48_:___516.541_:_26_|__82.72_:__6.909_:_____271_|____21.50_:___46.20_:__4.69_| |diff|___+.9%_:__+1.6%_:_+.1%_|_+15_66.7%_:_+14_34.4%_:_0%_|_+21.6%_:_+35.5%_:_+803.3%_|_+3_83.1%_:_+6_08.5_:_+8.1%_| however, trying to look to see the typescript code, wanting to translate that to type hinted python code, I've been unable to find typescript on CLBG, so I'm confused on how they got that data, permalink fedilink source parent hideshow 2 child comments replies: [–] FizzyOrange@programming.dev 2 points 1 year ago They used to have Typescript. Looks like they removed it at some point. permalink fedilink source parent
[–] FizzyOrange@programming.dev 7 points 1 year ago (1 child) It's barely transpiled. There are a couple of features that involve actual code generation - enums and namespaces (which are almost never used), but the vast majority of it is just stripping the type annotations so the performance will be 100% identical. It's like having "Python" and "Python with type hints" as separate languages and claiming there is a big speed difference between them. permalink fedilink source parent hideshow 2 child comments replies: [–] MinekPo1@lemmygrad.ml 1 point 1 year ago (1 child) I was originally going to comment that differences in performance between JS and TS appear to be most significant in one challenge ascii table about that, not screen reader friendly ___________________________________________________________________________________________________________________ |lang|_binary_trees___________|_fannkuch-redux_____________|_fasta_____________________|_normalized_________________| | JS | 312.14 : 21.349 : 916 | 413.90 : 33.663 : 26 | 64.84 : 5.098 : 30 | 4.45 : 6.52 : 4.59 | |_TS_|_315.10_:_21.686_:__915_|__6 898.48_:___516.541_:_26_|__82.72_:__6.909_:_____271_|____21.50_:___46.20_:__4.69_| |diff|___+.9%_:__+1.6%_:_+.1%_|_+15_66.7%_:_+14_34.4%_:_0%_|_+21.6%_:_+35.5%_:_+803.3%_|_+3_83.1%_:_+6_08.5_:_+8.1%_| however, trying to look to see the typescript code, wanting to translate that to type hinted python code, I've been unable to find typescript on CLBG, so I'm confused on how they got that data, permalink fedilink source parent hideshow 2 child comments replies: [–] FizzyOrange@programming.dev 2 points 1 year ago They used to have Typescript. Looks like they removed it at some point. permalink fedilink source parent
[–] MinekPo1@lemmygrad.ml 1 point 1 year ago (1 child) I was originally going to comment that differences in performance between JS and TS appear to be most significant in one challenge ascii table about that, not screen reader friendly ___________________________________________________________________________________________________________________ |lang|_binary_trees___________|_fannkuch-redux_____________|_fasta_____________________|_normalized_________________| | JS | 312.14 : 21.349 : 916 | 413.90 : 33.663 : 26 | 64.84 : 5.098 : 30 | 4.45 : 6.52 : 4.59 | |_TS_|_315.10_:_21.686_:__915_|__6 898.48_:___516.541_:_26_|__82.72_:__6.909_:_____271_|____21.50_:___46.20_:__4.69_| |diff|___+.9%_:__+1.6%_:_+.1%_|_+15_66.7%_:_+14_34.4%_:_0%_|_+21.6%_:_+35.5%_:_+803.3%_|_+3_83.1%_:_+6_08.5_:_+8.1%_| however, trying to look to see the typescript code, wanting to translate that to type hinted python code, I've been unable to find typescript on CLBG, so I'm confused on how they got that data, permalink fedilink source parent hideshow 2 child comments replies: [–] FizzyOrange@programming.dev 2 points 1 year ago They used to have Typescript. Looks like they removed it at some point. permalink fedilink source parent
[–] FizzyOrange@programming.dev 2 points 1 year ago They used to have Typescript. Looks like they removed it at some point. permalink fedilink source parent