gleam-lang/gleam

Avoid calling `bitArraySliceToFloat` in generated JS for float patterns

開放

#4,658 建立於 2025年6月2日

 (2 則留言) (0 個反應) (0 位負責人)Rust (960 個分叉)batch import
help wanted

倉庫指標

星標
 (21,417 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Today when using a :float bit array pattern the bitArraySliceToFloat function is called twice with the same arguments. This is wasted work!

Change the code generator to do it only once, saving the result to a variable to use twice.

貢獻者指南