This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FSharpByrefTypeInferBug | |
open System.Runtime.InteropServices | |
#nowarn "9" | |
type LONG = int32 | |
[<AutoOpen>] | |
module NativeMethods = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System.Security.Cryptography | |
open System.Diagnostics | |
let bench (digest: HashAlgorithm) (input: byte[]) = | |
use digest = digest | |
let sw = Stopwatch.StartNew() | |
for _ in 1..100 do | |
digest.ComputeHash input |> ignore | |
sw.Stop() | |
printfn "%s elapsed %O" (digest.GetType().Name) sw.Elapsed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by Jack Pappas | |
// This code is a reproduction case for an F# 3.0 / 3.1 compiler bug related | |
// to type parameter/variable propagation. | |
// To compile this code, create a new F# application project, reference the | |
// 'FParsec' NuGet package, then paste this code into the Program.fs created for | |
// the project. | |
module internal TypeVariableRepro = | |
open FParsec | |
open FParsec.Primitives |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original code: https://gist.github.com/taumuon/11302896 | |
// This implementation optimized by Jack Pappas (https://github.com/jack-pappas) | |
open MathNet.Numerics.Distributions | |
open MathNet.Numerics.Statistics | |
open MathNet.Numerics.Random | |
open LanguagePrimitives | |
let inline callPayoff strike price = | |
max (price - strike) GenericZero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code demonstrates how the F# compiler could detect and emit a warning | |
// for non-tail-recursive calls to help avoid stack overflows. | |
// In response to: http://fslang.uservoice.com/forums/245727-f-language/suggestions/5663074-enable-a-compiler-warning-when-a-recursive-algorit | |
module Blah | |
let foo x = | |
printfn "Foo: %x" x | |
let rec bar x = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original code posted in fsharp-opensource discussion: | |
// https://groups.google.com/forum/#!topic/fsharp-opensource/pI73-GkoxbY | |
namespace Blah | |
open System.Runtime.InteropServices | |
[<Struct>] | |
type vec3_t = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Results from running PerfComparison (https://github.com/jack-pappas/fs-core-optimized) | |
Random set density parameter: 0.850000 | |
RNG seed: 246071284 | |
---- | |
Warming up...done. | |
Create Random Set<int> (n=1000000) | |
FSharp.Core (Original) : 5250.775900 (ms) | |
FSharp.Core (Optimized) : 5239.608900 (ms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.ComponentModel.Design/ComponentDesigner.cs(189,4): warning CS0618: `System.ComponentModel.Design.ComponentDesigner.InitializeNonDefault()' is obsolete: ` This method has been deprecated. Use InitializeExistingComponent instead.' | |
System.ComponentModel.Design/DesignerActionList.cs(67,4): warning CS0162: Unreachable code detected | |
System.Data.Design/TypedDataSetGeneratorException.cs(50,12): warning CS0436: The type `Locale' conflicts with the imported type of same name'. Ignoring the impo rted type definition | |
../../build/common/Locale.cs(36,23): (Location of the symbol related to previous warning) | |
./../../class/lib/net_4_0/System.Data.dll (Location of the symbol related to previous warning) | |
System.Windows.Forms.Design/ComponentDocumentDesigner.cs(57,32): warning CS0618: `System.ComponentModel.Design.ViewTechnology.WindowsForms' is obsolete: `Use Vi ewTechnology.Defaul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# General (non-project-specific) patterns | |
############################################################################### | |
# OS junk files | |
*.DS_Store | |
[Tt]humbs.db | |
# Temp Files | |
*~ # UNIX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Total(ms) Self(ms) Calls Self(ms) Avg. Method name | |
4286133 688114 125 5504.912 "Internal.Utilities.Text.Parsing.Implementation:interpret<tok> (Internal.Utilities.Text.Parsing.Tables`1<tok>,Microsoft.FSharp.Core.FSharpFunc`2<Internal.Utilities.Text.Lexing.LexBuffer`1<char>, tok>,Internal.Utilities.Text.Lexing.LexBuffer`1<char>,int)" | |
15510 5287 3381 1.563738539 Internal.Utilities.Filename:checkPathForIllegalChars (string) | |
66587 9038 37284 0.242409613 "Internal.Utilities.ResizeArrayModule:go@307-3<T> (Microsoft.FSharp.Core.FSharpFunc`2<int, Microsoft.FSharp.Core.FSharpFunc`2<T, bool>>,System.Collections.Generic.List`1<T>,int)" | |
4579 1363 10550 0.129194313 Internal.Utilities.Collections.HashMultiMap`2:System-Collections-Generic-IEnumerable`1-GetEnumerator () | |
82669 32128 495368 0.064856834 "Internal.Utilities.Collections.Tagged.MapTreeModule:tryFind<T, a> (System.Collections.Generic.IComparer`1<T>,T,Internal.Utilities.Collections.Tagged.MapTree`2<T, a>)" | |
5311 1908 34340 0.055562027 Internal.Utilities.Collections.Ta |