gleam-lang/gleam

Lift literal expressions to top-level constants in JavaScript code generation

Open

#4,090 建立於 2024年12月17日

在 GitHub 查看
 (7 留言) (0 反應) (0 負責人)Rust (960 fork)batch import
help wanted

倉庫指標

Star
 (21,417 star)
PR 合併指標
 (平均合併 10天 19小時) (30 天內合併 69 個 PR)

描述

  1. make a massive list in gleam

you can use gleam csv package to turn a csv file to gleam list then do io.debug(parssed_csv)

  1. make the list be let list = [ // here will be the long list ]

  2. do some computation to the data for me it was getting a specific element from the list

  3. change the list from let list = to const list

(make sure its a process that would take 1 or more seconds so you can notice the difference visually)

i noticed this in a lustre application i needed to get the element number 34 from list number 77 this took 4 seconds just by changing the list to const it was instant

( the version this happened on was 1.5 iirc it good to test if it still happens now )

貢獻者指南