# Bioinformatics Benchmarks Project

**URL:** <https://chapel.discourse.group/t/bioinformatics-benchmarks-project/4275>\
**Category:** GSoC\
**Created:** [April 5, 2021, 3:53pm UTC](https://chapel.discourse.group/t/bioinformatics-benchmarks-project/4275 "2021-04-05T15:53:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonisC](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@AntonisC](https://chapel.discourse.group/u/AntonisC)\
**Post date:** [April 5, 2021, 3:53pm UTC](https://chapel.discourse.group/t/bioinformatics-benchmarks-project/4275/1 "2021-04-05T15:53:19Z")

</div>

Hello mentors!  
I am a 4th year Electrical and Computer Engineering student at the University of Thessaly, Volos, Greece and I am interested in Bioinformatics Benchmarks project. I have started learning Chapel recently and implemented the suggested "word count in strings" program.

> <https://github.com/AntonisChatzimichail/chapel-repo/blob/main/word_count.chpl>

I would like to hear your opinion on my approach.  
In addition, I have already submitted a draft proposal through the GSoC website and I am waiting for possible feedback.

Thanks, I hope to meet some of you soon.  
Antonis

---

<div class="post-metadata">

**Author:** ![e-kayrakli](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/e-kayrakli/32/134_2.png) [@e-kayrakli](https://chapel.discourse.group/u/e-kayrakli)\
**Post date:** [April 5, 2021, 5:23pm UTC](https://chapel.discourse.group/t/bioinformatics-benchmarks-project/4275/2 "2021-04-05T17:23:47Z")

</div>

Hi Antonis,

Quick thoughts:

- Why not `wordMap[word] += 1`? See as an example:

```Chapel
use Map;

var m = new map(string,int);

m["foo"] += 1;
m["foo"] += 1;
m["foo"] += 1;

writeln(m);

```

- There might be some performance implications of the idiom you use. And the best way to test different versions is to have a much larger string that has reoccurring words and run both idioms on the same string. Make sure you compile your applications with the `--fast` flag. You can use the timers in the `Time` module to measure time: [Time — Chapel Documentation 1.25](https://chapel-lang.org/docs/master/modules/standard/Time.html#)

Engin

---

<div class="post-metadata">

**Author:** ![AntonisC](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@AntonisC](https://chapel.discourse.group/u/AntonisC)\
**Post date:** [April 5, 2021, 8:30pm UTC](https://chapel.discourse.group/t/bioinformatics-benchmarks-project/4275/3 "2021-04-05T20:30:50Z")

</div>

Hi Engin,  
I didn't know that you can access an element of a map like that. I ran some quick performance tests for large strings with repetitive words and indeed your suggestion performs two times faster.

Thank you for your interest,  
Antonis
