F# Scribbles

My experiments with F#

Performance of large list on reverse function using F# and Scala

1000000 100000000 let l = [1..100000000];; Real: 00:00:32.954, CPU: 00:00:34.593, GC gen0: 1030, gen1: 520, gen2: 9

val l : int list = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; 99; 100; …]

reverse l;; Real: 00:01:05.544, CPU: 00:00:59.031, GC gen0: 517, gen1: 260, gen2: 14 val it : int list = [100000000; 99999999; 99999998; 99999997; 99999996; 99999995; 99999994; 99999993; 99999992; 99999991; 99999990; 99999989; 99999988; 99999987; 99999986; 99999985; 99999984; 99999983; 99999982; 99999981; 99999980; 99999979; 99999978; 99999977; 99999976; 99999975; 99999974; 99999973; 99999972; 99999971; 99999970; 99999969; 99999968; 99999967; 99999966; 99999965; 99999964; 99999963; 99999962; 99999961; 99999960; 99999959; 99999958; 99999957; 99999956; 99999955; 99999954; 99999953; 99999952; 99999951; 99999950; 99999949; 99999948; 99999947; 99999946; 99999945; 99999944; 99999943; 99999942; 99999941; 99999940; 99999939; 99999938; 99999937; 99999936; 99999935; 99999934; 99999933; 99999932; 99999931; 99999930; 99999929; 99999928; 99999927; 99999926; 99999925; 99999924; 99999923; 99999922; 99999921; 99999920; 99999919; 99999918; 99999917; 99999916; 99999915; 99999914; 99999913; 99999912; 99999911; 99999910; 99999909; 99999908; 99999907; 99999906; 99999905; 99999904; 99999903; 99999902; 99999901; …]