factorial-cache

command module
v0.0.0-...-ad9ab8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 12 Imported by: 0

README

Factorial Cache

A simple benchmark test of how datatype size affect during some important calculation such as factorial. In this test, I used an http server to test there reponse speed of factorial calculation of a given number n provided by a client.

Assumption

there is a need to precompute the value provided by client and store it on disk to better understand how and when to flush information to disk and also how to load such information in memory on startup .

Benchmarks and Testing

Initial testing with maximum number n = 500 shows the following result

  •  factorial memoized with big interger
  • factorial memoized with interger
  • factorial with no memoization

Benchmarking showed significant use of memory for factorial with no memoization and factorial memoized with interger

However the test was measured in terms of overflow and failure (this involves factorial with zero result and negative result due to overflow)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL