instruction
stringlengths
71
71.9k
What a difference 1 bit makes! This very fast, simple sieve of Eratosthenes quickly finds 32 bit primes. It uses a memory efficient BitArray for odd numbers – but the BitArray is at the maximum allowable length of an array. While it borrows heavily from its 31 bit counterpart, Sieve31, this sieve has some interestin...
I want a Python example that illustrates how object.__getattribute__ resolves instance attribute lookups. I'm looking for feedback about the following code. Is it a "close-enough" approximation of the object.__getattribute__ workflow using Python? I'm aware that under the hood C is accessing the type/object slots and ...
I've written code in Free Pascal based on a contest problem (The contest insists that I have to write with Pascal). It works like charm, but I think it still need some improvements, from memory usage to runtime. Input Format First line is n (Number of people in the Yellow Pages) and q (Number of people to search)...
The code below represents a lock-free ordered single-linked list, and is a modification of the algorithm proposed in this doc. How can I improve speed of searching (lookingup) in the list maintaining lock-free capability? Any suggestions, code modifications, examples, maybe other lock-free data structures? typedef uint...
This code works, but I feel like it's really hacky and could be done a lot better. Can anyone give some advice on how this could be neater? $scope.arrays = function() { $scope.committees = []; $scope.employees = []; $http({method: 'GET', url: 'data.php'}).success(function(data) { an...
I just created a naming convention analyzer + code fix based on the Roslyn platform. The implemented naming conventions are the following: If you're interested in seeing all the test scenarios that have been covered, you can take a look here. Some notes about the implementation: Analyzers and code fixes cannot share ...
Is there a way to improve this code? (specially how I built the recursion and the breaking out of the loops and conditionals) # Returns sum of present value of a sequence of cash flows # rate = interest rate (month) # initial amount = balance at the beginning # *amounts = sequence of cash flows (1 or more) def prese...
I have a Ruby script meant for some basic database tasks, such as add a user and deactivate a user. The end user can load up the script and follow the basic path of "Do I want to add a user?", or "Do I want to deactivate a user?". They have the option to retreat back to the main menu if needed. The script works just f...
I'm tinkering with the idea of crafting a search engine in my spare time. More of a learning experience than anything at this point, but still a project. A key aspect of this system is checking whether a domain is live or not. That's what this code is trying to do (and is succeeding). It's written in Java, and using...
I wrote my first python code to conduct PSO. I am wondering about the best practices for Python. While my code works, I want to make sure it's orthodox as well. For example, here is my class I use followed by a function that initializes the list of Particles that I use for the algorithm: ########### data representation...
After reading a bunch of Ruby tutorials, I decide to write fake ATM bank software. I've tried to use OOP design and just want to know if I'm on the right road. require "yaml" require 'colorize' class Person attr_accessor :info def initialize(info={}) @info = info end def change_info(info={})...
So I'm one of those weirdos over here talking about making a game engine for text-based (think Zork) games. There was pretty recently another question by someone else working on the same thing, if you're interested. Anyway, this is a prototype of the code for that engine, but instead of reading for a file (and being wr...
Question is here: Input The first line contains an integer \$N\$, which is the quantity of numbers written down by Vasya (\$1 \le N \le 1000\$). The second line contains these numbers separated by spaces. All the numbers are positive integers not greater than 10. Output Output the numbers Petya would write down separa...
I've built a function that mimics _.throttle (returns a new, throttled version of the passed function, that, when invoked repeatedly, will only actually call the original function at most once per every wait milliseconds). I would like to know what you think about my code, especially if the code is clean and essential ...
I came across this coding problem. Back in primary school, maybe you were sometimes asked to solve a fill-in-the-blank sum - or "mystery sum" - in which certain digits are removed and you had to figure out what they originally were. Now, it's time for serious business: sums with no digits, where every digit is r...
I have a CheckChanged method that I would like to improve as it takes a lot of space in my program and really hurts readability. The method prompts the user for input "Comments" and that is stored. However the below code is being used up to 70 times so any way to optimize would be great. private void checkBox45_Check...
This is a project Euler Problem #50. Here is my solution with the problem. /* * The prime 41, can be written as the sum of six consecutive primes: 41 = 2 * + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that * adds to a prime below one-hundred. The longest sum of consecutive primes * below one-...
This is my first jQuery plugin (used the jQuery ui widget factory). All code improvements are welcome. GitHub The plugin creates a gallery with one big picture and a given amount of clickable thumbnails. When the last thumbnail of set has been clicked it fades into the next thumbnail set. ;(function ($, window, documen...
I have created a python script that takes a 2D NumPy array of elevation values and given a seed value and an elevation it will grow a flood from that seed point. It does this by checking all adjacent cells to see if they are above or below the flood level. From there it checks all of those locations until all cells tha...
I've just created a function to check if your IP is within an array of IPs. The IP array can contain ranges like 192.168/170.50.0/255. I have a working example, but it seems a bit clunky to me. Is there anything wrong with my method, or anything I could improve? Link to Ideone example. <?php function checkIpWhitelist...
I have script which plays audio, shows/hides elements: var audio = new Audio("audio/test.mp3"); audio.addEventListener("ended", function(){ element.fadeIn(0); setTimeout(function() { element2.fadeIn(0); setTimeout(function() { elemen...
I wrote a PHP class in Zephir to increase performance, but it is still very slow and memory consuming. To compare, I wrote several variants of the same code, but unpack() is always nearly as slow at storing the data in a csv file. Is there any way to optimize this code? About 30% of the whole program time is spent in u...
For primality testing of 64 bit ulong, I have optimized a very fast trial-by-division test using possible factors of the form 6k+/-1. For input numbers less than uint.MaxValue serial testing is performed. For really larger numbers, parallel processing is performed. Again as optimized as it is, it is still trial-by-di...
In my efforts to learn the Swift language, I am trying to mix in a pet project along with my learning of the basic language syntax. In essence, i'm trying to write an iOS keypad application to work with my house alarm, which I have utilizing a device from Alarm Decoder. The device basically opens up a socket which I ha...
I have a small function in Objective-C which uses the C Socket API to check if the device has an active internet connection: #include <netdb.h> - (BOOL)isNetworkAvailable { char *hostname; struct hostent *hostinfo; hostname = "youtube.com"; hostinfo = gethostbyname(hostname); if (hostinfo == NULL)...
I have a QTreeview that is filled with data from data_for_tree dictionary. Suppose that dictionary represents the most common purchases a person makes. I call it "source list". Data, shown in that list differs from data that is shown in the "receiver list". Suppose a person inserted it via special form. The goal is - b...
I'm fairly new to C and wanted a general review of this code. It's a solution to this problem. You and your \$K-1\$ friends want to buy \$N\$ flowers. Flower number \$i\$ has cost \$c_i\$. Unfortunately the seller does not want just one customer to buy a lot of flowers, so he tries to change the price of flowers f...
This is a puzzle I found online that I have been trying to optimize and make the best version. I've tested it and it works great but I'm curious how it can be improved in any way. Instructions: "You forgot to give Professor Boolean's favorite rabbit specimen a name? You know how picky the professor is! Only particul...
I just completed my first multi class program, Blackjack, and it works! It allows the user to play Blackjack against a single dealer, with no other players at the table. I was wondering, seeing as it is my first multi class program, if you could help me optimize it and/or give me any advice. I want to implement insura...
I have this method that returns an array of all the hours for the past 24 hours, ex: if the current time is 3:24pm it looks like @[3pm,4pm...12am,1am...2pm,3pm]; Everything is working as it should, I was wondering if there was a more efficient (or pretty) way to do it than how I have it: NSCalendar *calendar = [NSCalen...
Here is my clone pointer template: #include <functional> #include <utility> #include <iostream> template<typename T> struct clone_ptr { clone_ptr() : ptr(nullptr), cloner(nullptr) {} clone_ptr(clone_ptr&& other) noexcept : clone_ptr() { swap( other ); } clone_ptr(const clone_ptr& ot...
I have created a MySQL database which will be used in a medical app, but I am pretty sure the design and the used queries can be improved, since I am new in database design. My biggest doubt is the s_apply column in combination table. The user should choose 1 main symptom (s_id). Main symptoms may have 0, 1 or 2 sympto...
I'm implementing a lock-free ordered doubly-linked list based on heavily modified paper entitled Split-Ordered Lists: Lock-Free Extensible Hash Tables by ORI SHALEV. My main concern is correctness of algorithm, secondly performance. Is the algorithm used in the code really lock-free? How can I improve the code? typedef...
A classic problem to split a string into its "root and suffix": (Stemming) The word "walk" is the base form for word "walking" (suffix is "ing"); The file path /var/www is the base path of /var/www/myApp; The string doi:10.1038/ncomms is the URN-prefix for doi:10.1038/ncomms7368 and doi:10.1038/ncomms7666; The word "h...
At the moment I am learning algorithms and here I am trying to implement a simple binary search tree. I would like to know your suggestions on whether I am on the right track or not, and how this can be improved. BinaryTree.cs class BinaryTree { private Node root; private int count; public BinaryTree() ...
Project Euler problem 1 says: Find the sum of all the multiples of 3 or 5 below 1000. I have written a program that will return the sum of the multiples of any list of positive integers. So for example if I wanted to know the sum of every integer that was a multiple of 3 and 5 that is less than 10 I would add 3,5,6, ...
I have implemented a simple read/write lock without using a critical section. I have tested my code by running 50 threads reading and writing the same data. .h file #pragma once #include "stdafx.h" class CReadWriteLock { public: CReadWriteLock(void); virtual ~CReadWriteLock(void); void LockReader(); voi...
(Project Euler #62) The digits of the cube, 41063625 (3453), can be permuted to produce two other cubes: 56623104 (3843) and 66430125 (4053). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are also cube. Find the smallest cube for which exactly five permutations o...
I have a windows form application which uses a form for two different purposes. We use the form for both our handheld system and our in-house system. I would just like someone to review the code for saving and see if I have done it the best way or if not, what the best solution is. Windows Form Save Method private void...
I have a function, getUnusedName that returns a random name, but first checks if it's already used by any object within a second array. Observing how many times the function is called across multiple runs shows a pretty wide variation as I would expect when using random. Is there a more efficient way of achieving this?...
I wrote a simple calculator with general operations. Give me please some advice, suggestions, and criticism about my code: code design, readability, mistakes. Calculator.java import javax.swing.*; public class Calculator { public static void main(String[] args) { CalculatorView calculator = new CalculatorView(...
I am working on a code to see if a video already exists. The problem is that I have to check multiple sections. The code is working but it should not be this big, I think, and it takes a long time to load. Is there an easier way to do this? $xmlurl7b = 'http://mysite.me/library/sections/2/all?title=' . $movie->title() ...
I have the following problem in my algorithms textbook: Write a computer program that generates and counts how many words of 5 letters of the English alphabet can be formed, with the condition that no 2 consecutive letters can be consonants or vowels. From the statement, I understand that the output should have this ...
Last night I thought a word search would be fairly interesting to try. I'm not sure how proper ones run, but my one kind of works through the brute force method, where it'll place a letter in one spot (the first letter of a random word), and branch out in all directions while narrowing down the list of matching words u...
I like to explicit return function even for void functions to reduce the use of if-elses, like this code snippet: private void processContactBetweenPlayers(Contact contact) { final Body bodyA = contact.getFixtureA().getBody(); final Body bodyB = contact.getFixtureB().getBody(); if (!isPlayer(bodyA) || !isPl...
I have this Excel/VBA code and here is what it does: I have 3 sheets, where first sheet has two columns that will be used (A,C). 2nd Sheet is just the raw data file that will be imported from external source. 3rd sheet is the final output. Column A in the first sheet is "Raw Column Headings" where the column headers f...
3 elements forms arithmetic sequence, when difference between any two consecutives of them is the same. In our task we are given array A. Any pair of integers in this array is called slice (eg. (B,C)), when 0 <= B < C< N, where N is an array length (0<=N<=60). A slice (B,C) is called arithmetic, when the sequence: A[B]...
A triangle needs a good foundation. Every row in the triangle is derived from the sum of the two values below it. However, there can be no repeated values, if a value shows up more than once the triangle crumbles. Find the base which minimises the value in the top of the triangle satisfying the condition of no duplica...
I have a client GL file (Excel) that needs to be regularly imported to SQL Server (as tab-delimited txt). Sample (simplified): PayCode PayDesc Dept1 Dept2 Dept3 ======================================== REG Regular 00001 00001 00002 VAC Vacation 00011 00012 00013 HOL Holiday 00021 0...
I'm quite a newbie in Python and I want to speed up this method since it takes very long time especially when the size of the input file in Mbs. Also, I couldn't figure out how to use Cython in the for loop. I'm using this function with other functions to compare files byte by byte. Any recommendations? # this function...
The idea here is we have Roles, Permissions, and a table called PermissionRoles that connect the two. So a Permissions can be in many Roles, and many Permissions can have the same Role. So what the following code does is: Get all the permissions required for a user to authenticate, by ActionName Loop through each of t...
Given A and B, count the numbers N such that A ≤ N ≤ B and N is a palindrome. Input: First line contains T, the number of testcases. Each testcase consists of two integers A and B in one line. Output: For each testcase, print the required answer in one line. Constraints: 1 ≤ T ≤ 10 0 ≤ A ≤ B ≤ 10^5 private st...
I spent a long time searching for ways to create a quiz app and to create a way to sort through non-random questions. The only way I was able to create was to use a series of 3 dictionaries that are key:value pairs. With 1 being the questions, 1 answers and 1 the explanations for the answers. The app works by a user ch...
For project Euler, I need quite often to test things like is x*y*z < 1e18. Since BigInteger is usually too slow, long overflows, and double may return incorrect result due to rounding, I wanted to use long with appropriate checks. As Guava's LongMath.checkedMultiply throws, it can't be used as exception handling is too...
The following code removes all pictures that are placed into Column A. When running the code however I have noticed it runs fairly slow. This will be attached to a command button that will be located in A1, it is important that the deleting of pictures doesnt target this command button. Any suggestions? ' Clears Al...
This reads a huge database (SQLite) and extract any IP address similar to ip_base: for num_db=1:10 i=1; % connection to different db db_name='C:\Users\galotibi\Documents\MATLAB\user'; obj_name='jdbc:SQLite:C:\Users\galotibi\Documents\MATLAB\user'; databases=strcat(db_name,num2str(num_db),'.db'); objects=strcat(o...
I've coded a function which uses a map and creates a random way between two points. Startpoint is always 0/0 and the goal is somewhere else everytime on the map. Now I'd like to know if I could change anything to make that function more efficient or use another function. But I need to create random ways and not the fa...
(This problem is related to Simple string-split by root and sufix algorithm) There are many ways to find a "common root" of a list of similar strings, that begins with the same substring... The question is what the best way (faster and elegant)? Do you know a book or library with these algorithms? Example: in the set ...
I posted yesterday about my first attempt at a Blackjack game. After I received much helpful advice I tried my best to fix up my code. I was wondering what you would think about round two! Edit: I also wanted to implement the ability to split a hand if you have two of the same card. My User class already has a split me...
I have a function that is able to return the factors of a number that are prime. For example: The prime factors of 13195 are 5, 7, 13 and 29. The function works great, and I was even able to improve it by dividing by just prime numbers instead of all numbers. The problem is it still isn't efficient enough because at 10...
Is there a faster, more efficient way to read a text file than this implementation? Taking into account phones capabilities: dictionary = new ArrayList<String>(); long start = System.currentTimeMillis(); int count = 0; try{ InputStream inputStream = context.getAssets().open("words.txt"); ...
I've been playing with a simple toyrobot exercise to brush up some of my forgotten language skills and was wondering if there was a nicer way to implement my main command parsing loop. I think the use of the two maps and the nested ternary operator is readable but would be interested in seeing other approaches. #inclu...
I am trying to construct a binary message packet. It needs to escape binary value 0 by appending extra 0 in front of it: //Before escape data[] = { 1, 2, 3, 4, 5, 0, 6, 7, 8, 9 } //After escape - value 0 is appended after 0 data[] = { 1, 2, 3, 4, 5, 0, 0, 6, 7, 8, 9 } My source code: uint8_t escape_data[32]; uint8_t ...
I am working on making my code run smoother, since I will be using it a lot in a game in development, but I am stumped. Is there any way I could make this run faster? Improvements to the terrain generation and image drawing are both welcome. internal class Terrain { public Terrain(Content content) { Ran...
Below is my query to identify what hazard type does the buildings belong: def floodhazard_tbl(request): if request.method == "GET": reference_high = FloodHazard.objects.filter(hazard='High') reference_medium = FloodHazard.objects.filter(hazard='Medium') reference_low = FloodHazard.objects.fi...
How can I improve this code? public String checkAddressFromMelissaServer(boolean isEditMode, boolean addressChecked, Address address) { boolean isAddress = false; boolean isError = true; String SystemResult = ""; boolean systemErrorFlag = false; StringBuffer requestAddress = new ...
I'm doing some simple validations using jQuery to check if all textboxes are filled. $(document).ready(function () { $("#<%= btnInsertCountry.ClientID %>").click(function () { var codeValue = $("#<%= txtCountryCode.ClientID %>").val(); var nameValue = $("#<%= txtCountryName.ClientID %>").val(); if (codeVal...
Please review my registration code and suggest what changes I should make to improve security. I'm new to PHP and this is my first project. Also I have no Idea how to make a "forget password page" as I've used password_hash to store passwords in database. <!doctype html> <html> <head> <meta charset="utf-8"> <title>VALI...
I have an application which uses ASP.net Identity as for its user authentication. I do not wish for users to reset their own password (for reasons which are not relevant here), so I have developed the following back end system to allow system administrators to reset the users password. I have the following implementati...
I think that everyone is familiar with the concept of a context (such as HttpContext in ASP.NET) where you can put some shared resources and take them back later in another module (I think the most used scenario is current/logged in user information). Well it's obvious that usually these contexts are generic (and in a ...
I want to refactor this code that is currently in a partial Form Class and deals with edits made on certain cells in a datagridview (in this case called dgvReplenish). I would like to refactor so that I can create unit tests to be able to test the logic that effects changing the back color of cells, and updating other ...
Problem Statement: Given a string of words return all words which have their reverse present in the string as ( (word1 , reverseword1 ) , (word2 ,reverseword2) ) Example Case: Input: Sachin tendulkar is the best tseb eht nihcaS Output: { ( best , tseb ) , ( the , eht) , (Sachin , nihcaS) } My approach is ...
Based on this: asymmetric encryption in C# I added some more functionality to make it even easier to use (I combined the keySize and the keys into one base64 string). My requirements are: I want a public and private string key A simple method to call to encrypt or decrypt another string. This works, and the followi...
As you will see from the code below, I have a base model. public class BasePDV { public int CaseID { get; set; } public string CustContactTel { get; set; } public string CustMobileTel { get; set; } public string PropertyType { get; set; } public string PremisesStatus { get; set; } public int Loc...
(Inspired by this question) The digits of the cube, 41063625 (3453), can be permuted to produce two other cubes: 56623104 (3843) and 66430125 (4053). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are also cube. Find the smallest cube for which exactly five permu...
I've create a basic Shader class in modern OpenGL (3.1) which works perfectly, though it is not feature complete yet. It still lacks the functionality to allow the user registering uniform variables in the shader and update them by calling a method. Suggestions on how to further advance the implementation are welcome, ...
Can you comment, review or suggest things for this? Maybe it should be broken into two methods? friends is a list of strings of 'T' or 'F' characters representing a friendship relation. For example for 3 people we could have friends = ['FTF','TFT','FTF'] This means that person 0 is friends with person 1 (since frien...
I have written code for graph traversal using adjacency matrices in an iterative approach. The code should print the graph in a DFS way. #include <iostream> using namespace std; int main(){ int n; cin>>n; int c[n][n]; int i,j; for(i=0;i<n;i++){ for(j=0;j<n;j++){ cin>>c[i][j]; ...
I have the recursive function below to cache all the folders of my company Drive into a file. It works like a charm but takes too long, specifically >30 secs to read and save the 300 folders. What I need is to make it faster somehow. I don't know if it is possible to make the folder reading asynchronous, or if it possi...
In light of this months Community Challenge, I've taken a stab at building something related. Keep in mind, this isn't a submission for the challenge, just a utility to help in the later process of completing the challenge. What we have here is your simple encryption and decryption (with a given key) tool. I'd like to ...
I have to create a quiz of showing questions from a JSON and post back the answers. Here's the structure of JSON: { "pp": [ { "profile_property": { "circle_value": 4, "created_at": null, "id": 1, "name": "THIS IS THE QUESTION TO DISPLAY", "updated_...
I'm working on a city building simulation game, and I have reached the point where I need to check whether tiles are connected to a power source. I decided on a flood fill for this, since it seemed simple enough to implement. For reference, I used this flood fill algorithm, and I also found this question on code revi...
The function's job is to load a vertex attribute buffer or an element buffer from a specified path, and upload it to OpenGL. Also, optionally, return the number of vertices/indices loaded through an output parameter. Signature: GLuint loadBufferFromFile(std::string const& bufferPath, unsigned char vertexElementCount, G...
I made a program that asks for a specified amount of numbers and checks if the input number is in the primitive type range. If it is, it "fits" on the primitive type. Each input number, it checks if the number is in the range of each primitive type MIN and MAX range. If it is between the range, it prints the type(s) i...
Given a binary tree, it's quite common to perform some operation on all nodes while traversing pre-order, in-order, post-order or level-order, depending on the task at hand. For example you might want to extract sorted elements from a binary search tree, for which in-order traversal is handy. Or do a breadth first sear...
My objective is to take a string as input and determine if it is a palindrome. I'm wondering how I could improve this code (efficiency, bugs, etc). I'm relatively new to Java so I'm expecting that my code will contain some errors. import java.util.Scanner; /** * Created by Adam on 6/5/2015. */ public...
I repeat here this answer on Stack Overflow. I first posted an answer with not finalized code, as a simple description of the solution I could think, without any test. But later I remained interested, so I worked to make it (hopefully) perfectly functional. To precisely define what it is meant to do, let me cite my pre...
Please critique my code. (Specifically, I'm not sure if my use of member variables is appropriate.) Here is the main structure of my BST class: public class bst { private Node root; public class Node { int data; Node left, right; private Node(int data) { this.data = data;...
The title says it all. This is yet another FizzBuzz implementation where you can specify the words you want to use, though it autoselects the divisors as the first n primes other than 2, rather than having you enter them. I'm looking for tips on variable/function naming and that kind of thing; I couldn't think of good ...
Below is my source code for the implementation of a Ring/Circular buffer for use in audio processing. I have been using this implementation for several months now but I have some doubts about the efficiency of the insertion and removal functions as well as the correctness/necessity of my usage of std::atomic<size_t>typ...
I'm trying to learn dynamic programming and the most popular one is to find the minimum number of coins for the change. I come up with this but I just want to improve this code which I think it could be shorter in Python but I'm new to Python too. import sys coins = [1, 3, 5] min_coin = [sys.maxint] * 20 min_coin[0] =...
The problem was to find which \$n\$ for which \$\varphi(n)\$ is a permutation of \$n\$ and \$n/\varphi(n)\$ is minimum,now as we all know that means (simple conclusions from mathematics): \$\varphi(n)\$ should be a permutation of n. \$n\$ should have least number of prime factors (2 cannot be one of the prime factor a...
I am creating a true or false quiz game and when the user chooses an answer a tick or cross will appear on the screen telling the user whether they are right or wrong and then automatically bring the next question in. Currently I am using 2 almost identical functions that draw the next question from my question array (...
As a new Java learner I would like to improve my coding style. I wrote a program which gets as an input a file name, and asks for two file names for the output. The first output file includes all the words from the input file with their number of occurrences. The second output file includes the words in lexicographic o...
I have a couple of models - User & Score. I am displaying data from those models to my template. Data from Score is filtered based on data from User. I am using nested for loops and an if condition within the template to get my desired result. However, I want to know if there is a better way of coming up with the same ...
I'm developing a small programming language for use in any project I have where I feel a small scripting language could be used well. I've written two emulators for the language, one in C++ and one in Java. The C++ performs faster except for any recursion in the language, in which it suddenly performs terribly! Here is...
Generate as many distinct primes P such that reverse (P) is also prime and is not equal to P. Output: Print per line one integer( ≤ 10^15 ). Don't print more than 10^6 integers in all. Scoring: Let N = correct outputs. M = incorrect outputs. Your score will be max(0,N-M). Note: Only one of P and reverse(P) will ...
I am doing FizzBuzz on a take home test (in Unity). I am sure this is just a competency check, but I went ahead and followed some coding conventions such as using constant fields, dependency injection, comments, etc. Is this overkill? If I should "dumb it down", how should I do so? Also, as seen in the directions, ...
I took the code from kostyas benchmarks for the Rust Brainfuck interpreter and tried to optimize it. There is also a discussion on Reddit about the poor performance of Rust in the Benchmark. Before my improvements the code needed 16.81s to complete the benchmark and used 6.2Mb of memory, after that the code only needs ...
I was hoping someone could check the library I 'm working on to see if they could give any suggestions. My biggest issue right now is getting tuple to work with more than just the basic types and I also wanted to add exception safety; is this only necessary for the file save/load functions? I also still need to add the...